README file from
GithubModel Weave
Model Weave is an Obsidian plugin for text-first modeling.
Markdown model files are the source of truth. Diagrams, previews, diagnostics, and PNG exports are derived outputs generated from Markdown.
Model Weave is currently aimed at Obsidian Desktop workflows. Viewer behavior, Mermaid rendering, zoom/pan interactions, and PNG export are designed around the desktop plugin runtime.
Core principles
- Markdown is the canonical design asset.
- Mermaid, SVG, preview UI, and PNG are generated views.
- Custom renderers are for detailed review.
- Mermaid renderers are for overview, relationships, and flow layout.
- Renderer choice does not change the Markdown source format.
Stable / primary formats
classclass_diagramer_entityer_diagramdfd_objectdfd_diagramdata_object
Experimental / evolving formats
screenapp_processrulecodesetmessagemapping
Format docs index:
V0.7 rendering policy:
V0.7 rendering policy summary
render_modevalues:autocustommermaid
automeans “use the default renderer for this format”. It is not itself a renderer.- Renderer selection priority:
- toolbar override
frontmatter.render_modesettings.defaultRenderMode- format default
- Toolbar selection is temporary and does not edit Markdown or frontmatter.
- Unsupported render requests fall back safely with diagnostics.
Custom vs Mermaid
- Custom renderer:
- detailed review views
- row-jump/navigation heavy views
- richer diagnostics and tables
- Mermaid renderer:
- overview graphs
- relation/flow readability
- automatic layout and routing
DFD in V0.7
dfd_diagramis Mermaid-first in V0.7.- The formal DFD diagram path is Mermaid
flowchart LR. - The old DFD custom renderer is treated as legacy and planned for removal later.
- DFD local objects are supported directly in
dfd_diagram.Objects. - DFD Mermaid does not require layout files.
Settings
Minimal Model Weave settings currently include:
defaultRenderModedefaultZoomfontSizenodeDensity
These settings affect Viewer behavior only. They do not rewrite Markdown or frontmatter.
Installation
Model Weave is being prepared for public release, but this README does not assume that it is already available in the Obsidian Community Plugin directory.
Planned installation path after approval:
- Install from Obsidian Community Plugins once the plugin is approved and published there.
Current practical path:
- Use manual installation from this repository or a packaged release artifact.
Manual installation outline:
- Get the repository or release files.
- Build the plugin if needed.
- Copy the plugin files into
.obsidian/plugins/model-weave/in your vault. - Enable Model Weave in Obsidian Desktop.
Quick Start
- Install and enable Model Weave in Obsidian Desktop.
- Open a file from samples/ or create a Markdown model file in your vault.
- Add frontmatter such as
type: class,type: er_entity, ortype: dfd_diagram. - Open the Command palette with
Ctrl+P/Cmd+P, then runOpen modeling preview for active file. - Confirm the parsed preview in the Model Weave Viewer.
- Use Custom mode for detailed review where available.
- Use Mermaid mode for overview, relationship, and flow views where available.
Commands
Available Obsidian Command palette commands currently registered by Model Weave:
Rebuild modeling indexOpen modeling preview for active fileInsert Class TemplateInsert Class Diagram TemplateInsert ER Entity TemplateInsert ER Diagram TemplateInsert DFD Object TemplateInsert DFD Diagram TemplateInsert Data Object TemplateInsert Data Object File Layout TemplateInsert App Process TemplateInsert Screen TemplateInsert CodeSet TemplateInsert Message TemplateInsert Rule TemplateInsert Mapping TemplateInsert ER Relation BlockComplete Current FieldExport Current Diagram as PNG
Viewer behavior
- Shared Viewer features include zoom, fit,
100%, pan, diagnostics, upper/lower resizable panels, and PNG export. - RenderMode selector is shown only where multiple meaningful renderers exist:
- shown for Class / ER views
- hidden for DFD because DFD is Mermaid-first
- hidden for table/text-only formats
- PNG export exports the diagram body only.
- Toolbar, diagnostics panel, lower information area, and resize handle are excluded from PNG export.
- Export fits the full diagram rather than only the current zoom/pan state.
Performance & Scale
- For large systems, prefer splitting diagrams into multiple files instead of putting every object into one graph.
Known Limitations
- Model Weave is currently focused on Obsidian Desktop workflows.
- Very large Mermaid diagrams may hit rendering or PNG export performance limits.
- PNG export output may vary slightly depending on fonts, CSS, theme, and device pixel ratio.
- DFD diagrams are Mermaid-first; custom DFD rendering is not provided.
- Some formats are still experimental or evolving, including
screen,app_process,rule,codeset,message, andmapping. - Markdown files are the source of truth. Mermaid, SVG, preview UI, and PNG files are generated views, not separate editable sources.
Mermaid safety notes
- Mermaid source is generated output, not authoring source.
- Mermaid node IDs should be safe generated internal IDs, not raw labels or wikilinks.
- Display labels should remain separate from Mermaid internal IDs.
- Mermaid labels should be quoted/escaped safely.
- Navigation should prefer Model Weave-controlled SVG post-processing rather than Mermaid click callback syntax.
- Avoid relying on unsafe Mermaid settings such as loose security only for navigation.
- Mermaid PNG export can still vary slightly depending on fonts, CSS, and device pixel ratio.
DFD local object summary
Preferred dfd_diagram.Objects columns in V0.7:
| id | label | kind | ref | notes |
|---|
id: diagram-local object IDlabel: display labelkind:external/process/datastore/otherref: optionaldfd_objectreferencenotes: optional notes
Rules:
refempty means a valid local diagram object.refpresent means a linked reusabledfd_objectwhen resolvable.- Old ref-only
Objectsformat remains compatible. Flows.from/toresolve through listedObjects.- Flows must not silently create missing nodes.
See:
Repository layout
- docs
- docs/formats
- samples
- Templates
testdata/(diagnostics / compatibility checks, if present in local development copies)
Samples
Sample index:
Useful manual checks:
- Class:
- ER:
- DFD:
Notes for public release
- This repository contains samples and test-oriented files side by side.
testdata/is for warning/unsupported/diagnostic checks and is not the main public sample set.- Some format docs are still pending publication as standalone spec pages. The current docs index marks those cases explicitly instead of inventing partial specs here.
License
Model Weave is released under the MIT License.