| node_modules | ||
| samples/v03 | ||
| src | ||
| Templates/v03 | ||
| testdata/v03 | ||
| esbuild.config.mjs | ||
| main.js | ||
| manifest.json | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| README_JP.md | ||
| tsconfig.json | ||
| versions.json | ||
Model Weave: V0.4 Samples and Templates
Model Weave is an Obsidian plugin for managing text-first models, relationships, and diagrams in Markdown.
This repository uses the V0.4 modeling file formats below as the formal supported formats.
classclass_diagramer_entityer_diagram
Legacy formats such as schema: diagram_v1, type: diagram, and type: er_relation are not formal formats anymore. They are kept only under testdata/v03/legacy for unsupported-state checks.
Directory Layout
- Templates/v03
- Formal copy-paste templates for V0.4 files
- samples/v03/minimal
- Small samples for parser and preview checks
- samples/v03/rich
- Richer samples for layout, relation density, and single-view checks
- testdata/v03/warning
- Warning and note verification files
- testdata/v03/legacy
- Unsupported legacy files, test purpose only
Template Usage
Use the files in Templates/v03 as the starting point for new modeling files. The directory name is kept for compatibility with earlier sample organization, but the current content follows the V0.4 rules.
- Templates/v03/er_entity.md
- Templates/v03/er_diagram.md
- Templates/v03/class.md
- Templates/v03/class_diagram.md
Guidelines:
- Keep the filename aligned with the
idfield. - Use Markdown tables exactly as shown in the templates.
- Do not use legacy
diagram_v1ortype: diagramin new files. - For
class, use Spec04 relations:id / to / kind / label / from_multiplicity / to_multiplicity / notes. Thefromside is the current class file'sid. - For
class.Relations.to, use the target class ID, not a wikilink. - For
er_entity.target_table,er_diagram.Objects.ref, andclass_diagram.Objects.ref, prefer wikilinks that point to the actual file path. - For abstract classes, use
kind: classwithstereotype: abstract.
Reference Rules
- ER file references should be clickable wikilinks such as
[[samples/v03/rich/er/ENT-CUSTOMER]]. Internally, ER relation handling uses the linked entity'sphysical_name. - Diagram object refs should also be clickable wikilinks to the object files.
- Class single-file relations use ID-based
tovalues such asIF-ORDER-REPOSITORY. - Class diagram relations still use explicit
from/tobecause they describe diagram-level edges. - The old class relation table with an explicit
fromcolumn is accepted only for compatibility and should not be used for new files.
Sample Purposes
Minimal samples
Use these to confirm that parser, single-object view, and diagram view work with the smallest valid V0.4 input.
- ER
- Class
Rich relation samples
Use these to confirm denser relation graphs, layout stability, node summaries, and related-object lists.
Warning samples
Use these only for testing warning and note behavior.
- Unresolved ER relation:
- Broken class table:
- Unresolved class diagram references:
- Outside-scope ER warning behavior:
Unsupported samples
Use these only to confirm unsupported-state messaging.
Quick Verification Guide
ER single-object view
Open:
Check:
- Column and index tables
- Related graph
- Inbound and outbound relations
- Mapping summary
ER diagram view
Open:
Check:
- Diagram object resolution
- Relation aggregation from
er_entity - Fit, zoom, pan, and click navigation
Class single-object view
Open:
- samples/v03/minimal/class/CLS-ORDER-SERVICE.md
- samples/v03/rich/class/CLS-ORDER-APPLICATION-SERVICE.md
Check:
- Attributes, methods, and relations tables
- Related graph
- Inbound and outbound class relations
Class diagram view
Open:
- samples/v03/minimal/class/CLASSD-ORDER-SERVICE.md
- samples/v03/rich/class/CLASSD-ORDER-APPLICATION.md
Check:
- Object resolution from
## Objects - Explicit diagram relations
- Fallback auto-collect behavior when diagram relations are empty
Warning and unsupported checks
Open:
- Warning cases under testdata/v03/warning
- Unsupported cases under testdata/v03/legacy
Check:
- Warnings only for real resolution or structure issues
- Notes for fallback or scope explanations
- Unsupported state for legacy formats
Naming Rules
- ER entity IDs:
ENT-... - ER diagram IDs:
ERD-... - Class IDs:
CLS-...,IF-...,ABS-... - Class diagram IDs:
CLASSD-...
Keep the filename equal to the ID whenever possible.