# mbse-diagramming

Adopt this skill: https://proskills.md/skills/other/dynamicalsystemsgroup-mbse-skills-skills-mbse-diagramming

Page: https://proskills.md/skills/other/dynamicalsystemsgroup-mbse-skills-skills-mbse-diagramming
This document is the public skill bundle for that page. It contains SKILL.md and every helper file the catalog carries. No login is required.

## File: skills/mbse-diagramming/SKILL.md
size: 4094
sha: 5b341347c44e42dfbf75b7a7e9b04c0b2e1f9838
upstream: https://github.com/dynamicalsystemsgroup/mbse_skills/blob/main/skills/mbse-diagramming/SKILL.md

```text
---
name: mbse-diagramming
description: Create or review source-linked engineering architecture, workflow, sequence or state diagrams in Mermaid, Graphviz or an available UML/PlantUML tool skill; preserve semantics and report actual rendering checks.
license: Apache-2.0
---

# MBSE Diagramming

## Clarification and human review

Engineers retain responsibility for engineering decisions. Clarify unresolved relationship semantics, source authority or omitted critical behavior when they could change the result; reuse established answers. Keep dependent conclusions pending while continuing authorized drafting or investigation. Present changed engineering artifacts as proposed or awaiting review, preserving existing source and approval status. Request the responsible human's review before adopting changed obligations, design decisions or adequacy claims. Report the artifact revision, evidence scope, open questions and decision needed; record acceptance only when actually supplied by an identified authority. A passing tool check, silence or agent agreement is not human acceptance.

Create an explanatory view of supplied engineering artifacts, retaining their authority and uncertainty. This extension expresses an architecture or behavior; it does not choose a methodology or establish model validity.

1. Identify the audience, question and view: components/interfaces, workflow, sequence or state transitions. Read the relevant source slice and record its file/revision or byte identity. Distinguish proposed designs from observed implementation; keep unresolved facts visible. Use the [output and fidelity contract](references/view-contract.md) to set destination size/detail and preserve a reconciliation ledger.
2. List the responsibilities and relationships needed to answer the question. Preserve direction, exchanged item, guard, ordering, ownership and boundary meaning. Keep stable artifact IDs in labels or a companion mapping. State omitted details and aggregation explicitly.
3. Choose Mermaid for compact text diagrams in docs, Graphviz DOT for graph-oriented views, or an available UML/PlantUML skill for explicitly requested notation. Reuse its selected syntax/rendering resources while retaining this engineering evidence contract. For a named SysML/UML diagram family, read [family coverage and authoring criteria](references/diagram-families.md) before selecting notation. Read [tool contracts](references/tools.md) for syntax pointers, local rendering and an optional Archify handoff. Use conservative syntax compatible with the selected renderer.
4. Author the editable source and source mapping before styling. Label each relationship by what it actually means: energy transfer, allocation, dependency, control or traceability are distinct. A drawn arrow is not a SysML relationship or proof of satisfaction.
   For imported Mermaid/Draw.io, read [import limits](references/import-contract.md) before extraction. For bottlenecks, stage gates, provenance or paired verification views, select a [semantic pattern](references/semantic-patterns.md). For sequence/state authoring, consult the [bounded examples](references/behavior-examples.md).
5. Run the available native renderer; retain exact version, command, source hash and output hash. Inspect the rendered view for readable labels, edge direction, missing topology, crossings and boundaries. If the renderer is unavailable, deliver source with rendering explicitly not run.
6. Repair layout without changing agreed relationships or evidence. If a semantic change is needed, identify and review it separately. Deliver editable source, mapping, legend/assumptions, available exports and a check record.

Completion requires every material node and relationship to have an identified source or proposed status, and each check to report passed, failed or not run with its scope. Distinguish source/topology inspection, native rendering, browser checks and visual review. These are original collection conventions inspired by Archify; this extension does not reproduce its renderer or claim its quality gates.
```

## File: skills/mbse-diagramming/scripts/import_view.py
size: 6326
sha: c7b2f4932ec664a4f56c00f0424b16bcddb086c3
upstream: https://github.com/dynamicalsystemsgroup/mbse_skills/blob/main/skills/mbse-diagramming/scripts/import_view.py

```text
"""Extract a bounded Mermaid flowchart or uncompressed Draw.io structural view."""
import argparse
import hashlib
import json
from pathlib import Path
import re
import xml.etree.ElementTree as ET

NODE = r'([A-Za-z_][A-Za-z0-9_]*)(?:\["([^"\n]*)"\])?'
EDGE = re.compile(NODE + r'\s*(-->|-\.->)(?:\|([^|\n]*)\|)?\s*' + NODE)

def mermaid(text):
    nodes, edges, metadata = {}, [], {}
    declared = set()
    lines = text.splitlines()
    first = next((i for i, line in enumerate(lines) if line.strip() and not line.strip().startswith('%%')), None)
    if first is None or not re.fullmatch(r'(flowchart|graph)\s+(LR|RL|TB|TD|BT)', lines[first].strip()):
        raise ValueError('expected flowchart/graph direction header')
    def node(key, label):
        if key not in nodes:
            nodes[key] = {'id': key, 'label': key, 'parent': None}
        if label is not None:
            if key in declared and nodes[key]['label'] != label:
                raise ValueError(f'conflicting node label: {key}')
            nodes[key]['label'] = label
            declared.add(key)
    for number, line in enumerate(lines[first+1:], first+2):
        line = line.strip()
        if not line or line.startswith('%%'):
            continue
        if line in {'end', 'subgraph'}:
            raise ValueError(f'unsupported Mermaid statement at line {number}')
        meta = re.fullmatch(r'(accTitle|accDescr):\s*(.+)', line)
        if meta:
            if meta[1] in metadata:
                raise ValueError('duplicate accessibility metadata')
            metadata[meta[1]] = meta[2]
            continue
        match = EDGE.fullmatch(line)
        if match:
            source, slabel, arrow, label, target, tlabel = match.groups()
            node(source, slabel)
            node(target, tlabel)
            raw_label = label or ''
            if label and label.startswith('"') and label.endswith('"'):
                label = label[1:-1]
            edges.append({'id': f'edge-{len(edges)+1}', 'source': source, 'target': target,
                          'label': label or '', 'raw_label': raw_label,
                          'line_style': 'dashed' if arrow == '-.->' else 'solid'})
        else:
            match = re.fullmatch(NODE, line)
            if not match:
                raise ValueError(f'unsupported Mermaid statement at line {number}')
            node(*match.groups())
    return list(nodes.values()), edges, metadata

def drawio(text):
    if '<!DOCTYPE' in text.upper() or '<!ENTITY' in text.upper():
        raise ValueError('DTD/entities unsupported')
    root = ET.fromstring(text)
    if root.tag == 'mxfile':
        pages = list(root)
        if len(pages) != 1 or pages[0].tag != 'diagram' or len(pages[0]) != 1:
            raise ValueError('expected one uncompressed Draw.io page')
        root = pages[0][0]
    if root.tag != 'mxGraphModel' or len(root) != 1 or root[0].tag != 'root':
        raise ValueError('expected uncompressed mxGraphModel/root')
    cells = list(root[0])
    if any(cell.tag != 'mxCell' for cell in cells):
        raise ValueError('unsupported Draw.io object wrapper')
    ids = [cell.get('id') for cell in cells]
    if any(not key for key in ids) or len(set(ids)) != len(ids):
        raise ValueError('missing/duplicate cell ID')
    nodes, edges = [], []
    vertices = {cell.get('id') for cell in cells if cell.get('vertex') == '1'}
    parents = {}
    for cell in cells:
        key, parent = cell.get('id'), cell.get('parent')
        if parent is not None and parent not in ids:
            raise ValueError('unknown parent cell')
        parents[key] = parent
        if any(child.tag != 'mxGeometry' for child in cell):
            raise ValueError('unsupported cell child')
        if cell.get('vertex') == '1' and cell.get('edge') == '1':
            raise ValueError('cell cannot be vertex and edge')
        if cell.get('vertex') == '1':
            nodes.append({'id': key, 'label': cell.get('value', ''),
                          'parent': parent if parent in vertices else None})
        elif cell.get('edge') == '1':
            source, target = cell.get('source'), cell.get('target')
            if source not in vertices or target not in vertices:
                raise ValueError('edge endpoint missing or unsupported')
            edges.append({'id': key, 'source': source, 'target': target,
                          'label': cell.get('value', ''), 'line_style': 'unknown'})
        elif cell.get('value') or cell.get('source') or cell.get('target'):
            raise ValueError('unsupported non-vertex content')
    for key in ids:
        seen, cursor = set(), key
        while cursor is not None:
            if cursor in seen:
                raise ValueError('cyclic parent ownership')
            seen.add(cursor)
            cursor = parents[cursor]
    return nodes, edges, {}

def extract(raw, format):
    if len(raw) > 1024 * 1024:
        raise ValueError('input exceeds 1 MiB')
    text = raw.decode('utf-8')
    nodes, edges, metadata = {'mermaid': mermaid, 'drawio': drawio}[format](text)
    if len(nodes) > 1000 or len(edges) > 2000:
        raise ValueError('view exceeds node/edge budget')
    return {'schema_version': 1, 'format': format,
            'source_sha256': hashlib.sha256(raw).hexdigest(),
            'helper_sha256': hashlib.sha256(Path(__file__).read_bytes()).hexdigest(),
            'nodes': nodes, 'edges': edges, 'accessibility': metadata,
            'counts': {'nodes': len(nodes), 'edges': len(edges)},
            'limits': ['structural subset only; no renderer or semantic validation',
                       'labels are inert strings; escape before rendering',
                       'source styles/geometry not retained; source bytes remain authoritative']}

def main():
    parser = argparse.ArgumentParser(description=__doc__)
    parser.add_argument('source', type=Path)
    parser.add_argument('--format', required=True, choices=('mermaid', 'drawio'))
    args = parser.parse_args()
    try:
        with args.source.open('rb') as stream:
            raw = stream.read(1024 * 1024 + 1)
        print(json.dumps(extract(raw, args.format), indent=2))
    except (OSError, ValueError, ET.ParseError) as error:
        parser.exit(1, f'{error}\n')

if __name__ == '__main__':
    main()
```

## File: skills/mbse-diagramming/scripts/svg_check.py
size: 2874
sha: 82a5d1d517e33e6a985501b145bf86856ae37a29
upstream: https://github.com/dynamicalsystemsgroup/mbse_skills/blob/main/skills/mbse-diagramming/scripts/svg_check.py

```text
"""Check a bounded static SVG accessibility contract, not rendered geometry."""
import argparse
import json
from pathlib import Path
import xml.etree.ElementTree as ET

def check(raw):
    if len(raw) > 1024 * 1024:
        raise ValueError('SVG exceeds 1 MiB')
    if b'<!DOCTYPE' in raw.upper() or b'<!ENTITY' in raw.upper():
        raise ValueError('DTD/entities unsupported')
    root = ET.fromstring(raw)
    ns = '{http://www.w3.org/2000/svg}'
    if root.tag != ns + 'svg' or root.get('role') != 'img':
        raise ValueError('expected standalone SVG with role="img"')
    ids = {}
    for element in root.iter():
        key = element.get('id')
        if key:
            if key in ids:
                raise ValueError(f'duplicate ID: {key}')
            ids[key] = element
        if element.tag in {ns + tag for tag in ('script', 'foreignObject', 'animate', 'animateMotion', 'animateTransform', 'set', 'style')}:
            raise ValueError('active/animated/styled content outside static checker scope')
        if any(name.lower().startswith('on') for name in element.attrib):
            raise ValueError('event handler unsupported')
        for name, value in element.attrib.items():
            if name.rsplit('}', 1)[-1] == 'href':
                if not value.startswith('#'):
                    raise ValueError('external reference unsupported')
                if value[1:] not in {item.get('id') for item in root.iter()}:
                    raise ValueError('unresolved local reference')
    references = root.get('aria-labelledby', '').split()
    if len(references) != 2 or len(set(references)) != 2:
        raise ValueError('aria-labelledby must name distinct title and description')
    for key, tag in zip(references, ('title', 'desc')):
        target = ids.get(key)
        if target is None or target.tag != ns + tag or target not in list(root):
            raise ValueError('unresolved or misplaced accessibility reference')
        if not key.endswith('-' + tag) or not key[:-len(tag)-1]:
            raise ValueError('accessibility IDs must be diagram-prefixed')
        if not ''.join(target.itertext()).strip():
            raise ValueError('empty accessibility text')
    if list(root)[0].tag != ns + 'title':
        raise ValueError('title must be first child')
    return {'static_svg_accessibility': 'passed', 'geometry': 'not-run',
            'visual_review': 'not-run', 'model_semantics': 'not-run'}

def main():
    parser = argparse.ArgumentParser(description=__doc__)
    parser.add_argument('svg', type=Path)
    args = parser.parse_args()
    try:
        with args.svg.open('rb') as stream:
            result = check(stream.read(1024 * 1024 + 1))
        print(json.dumps(result))
    except (OSError, ValueError, ET.ParseError) as error:
        parser.exit(1, f'{error}\n')

if __name__ == '__main__':
    main()
```

## File: skills/mbse-diagramming/references/behavior-examples.md
size: 2276
sha: 10dbe341645b9405a1da0e2dc7a5111af5cb7775
upstream: https://github.com/dynamicalsystemsgroup/mbse_skills/blob/main/skills/mbse-diagramming/references/behavior-examples.md

````text
# Behavior view examples

These original Mermaid examples explain a proposed controller. They are not
formal UML/SysML validation or observed vehicle behavior. Native rendering is
not yet tested; run the selected renderer and inspect the export before use.
They are outside the bundled flowchart importer's supported subset.

## Sequence

```mermaid
sequenceDiagram
    participant Driver
    participant Controller
    participant Power
    Driver->>Controller: request start
    activate Controller
    Controller->>Power: check available energy
    Power-->>Controller: available energy result
    alt start permitted
        Controller->>Power: enable supply
        opt monitoring requested
            loop while enabled
                Controller->>Controller: evaluate monitoring sample
            end
        end
        Controller-->>Driver: started
    else start denied
        Controller-->>Driver: denied with reason
    end
    deactivate Controller
```

Map participants and messages to architecture/interface IDs. `start permitted`
needs a defined requirement/guard before becoming a model assertion. Activation
means execution focus in this view, not proven scheduling or duration. Check
that alternative guards cover intended cases, optional behavior is actually
optional, loops have an identified termination condition, self-messages fit
their lifeline and fragment labels do not overlap messages. This example does
not exercise parallel/critical fragments, participant creation/destruction or
quantitative timing.

## State

```mermaid
stateDiagram-v2
    [*] --> Off
    Off --> Starting: start request
    Starting --> Running: supply enabled
    Starting --> Off: start denied
    Running --> Off: stop request
    Running --> Fault: fault detected
    Fault --> Off: authorized reset
```

Map states and transition events to behavior IDs. Record guards and effects in
a companion transition table when prose labels cannot express them precisely.
Distinguish reset authorization from fault detection; absence of an edge does
not establish that an event is forbidden. Check initial/final semantics,
reachability, unresolved events and mutually exclusive guards against the
source model. This example omits concurrency, history and hierarchical states.
````

## File: skills/mbse-diagramming/references/diagram-families.md
size: 6120
sha: c1d2395c1bbf1af540ce77c215b32aa348356688
upstream: https://github.com/dynamicalsystemsgroup/mbse_skills/blob/main/skills/mbse-diagramming/references/diagram-families.md

```text
# Diagram families: coverage and authoring criteria

The user-supplied automobile table uses familiar SysML v1 diagram-family names. Its publication/edition is unidentified; it is task context, not normative authority. [OMG SysML 1.7](https://www.omg.org/spec/SysML/1.7) and [SysML 2.0](https://www.omg.org/spec/SysML/2.0) are separate specifications. Select the required language/version before claiming formal notation. The guidance below is original engineering view-design advice; it is not a substitute for the adopted specification.

## Current coverage

| Requested family | Collection guidance | Formal notation/examples |
| --- | --- | --- |
| Package | Organization/view ownership criteria below | No dedicated formal template or native validation |
| Requirement | Requirements and traceability practices; criteria below | No formal requirement-diagram template |
| Block definition | Logical/type/hierarchy criteria below | Informal topology only; no SysML v1 BDD exporter |
| Internal block | Parts/interfaces/connection criteria below | Source-linked informal example; no formal IBD exporter |
| Use case | Actor/boundary/goal criteria below | No dedicated rendered example |
| Sequence | Ordering/message criteria plus Mermaid syntax reference | No native sequence rendering tested |
| Activity | Flow/decision/concurrency criteria plus Mermaid flowchart reference | No formal activity-notation example |
| State machine | State/transition criteria plus Mermaid state syntax reference | No native state rendering tested |
| Parametric | Constraint reasoning and engineering plots; criteria below | No formal parametric-diagram template or solver |
| Timing (the table labels it outside SysML) | Time-axis/event criteria below | No dedicated timing renderer/example |

Mermaid, Graphviz and editable sketches can communicate these concerns with an explicit legend. A generic flowchart/class shape is not automatically a formal SysML diagram. Full formal-family support requires edition-specific notation references, a suitable renderer/modeling engine, source/model mapping, and tested examples. Existing tool-skills remain optional handoffs.

## Select and author the relevant family

- **Package / organization view:** show namespaces, package ownership and intentionally exposed dependencies/imports. Separate containment from dependency arrows. Identify whether a viewpoint is a stakeholder perspective or a package containing view artifacts; visual nesting alone does not establish either.
- **Requirement view:** show stable IDs, obligation text/acceptance and source/status. Distinguish derivation, refinement, allocation, satisfaction claims and verification links. Include check/evidence identities in a companion trace matrix when the diagram would become unreadable. A relationship labeled satisfaction records a claim; retain its supporting observation separately.
- **Block definition / type or hierarchy view:** identify definitions, specialization and part/composition relationships with multiplicity and role names where material. Distinguish a type from its occurrences. Do not interpret all hierarchy arrows as inheritance or containment. An analysis context should identify assumptions, quantities and relevant participants rather than only component names.
- **Internal block / internal structure view:** choose one enclosing context, show part occurrences, ports/interface endpoints and connectors. Name the exchanged information, energy or material and direction/units where applicable. Check producer/consumer responsibilities and distinguish an external context boundary from a subsystem's internal structure.
- **Use case / stakeholder interaction view:** show actors outside the selected system boundary and goals/services inside it. State scope, success condition and exceptions in a companion scenario. Keep implementation steps in a behavior view; avoid making every internal function a stakeholder use case.
- **Sequence / interaction view:** identify participants/occurrences and the triggering scenario. Preserve message sender/receiver, ordering, guards and alternatives. Distinguish calls, replies and physical/information exchanges. Show concurrency and timing constraints only when supported by the source; vertical placement alone is not a quantitative time axis.
- **Activity / behavior-flow view:** identify inputs/outputs, actions, control and object flows, decision guards and parallel branches. Distinguish branching from concurrency and their merge/join conditions. Trace actions to responsibilities and show exceptional outcomes relevant to the requested decision. A Mermaid flowchart is an explanatory rendering unless formal semantics are established separately.
- **State machine / lifecycle view:** identify the state-owning system, initial/terminal conditions, states, triggers, guards and effects. Check event coverage, unreachable states and competing transitions against the supplied behavior. State names should represent conditions rather than simply repeat an activity sequence. Mark unmodeled faults or recovery explicitly.
- **Parametric / analysis view:** identify quantities, units, equation/constraint definitions and bindings to the actual design parameters. Separate known inputs, solved values, constraints and optimization objectives. Record assumptions and solver/engine scope; independently check dimensions and numerical boundaries. A plotted feasible region is an analytical view, not proof that a formal parametric model was executed.
- **Timing / performance timeline:** use a labeled time axis with units and origin, state/value tracks, events and intervals. Distinguish measured samples, model predictions and illustrative timing. Record precision, interpolation and clock assumptions; sequence order does not establish duration. Missing temporal data remains open.

All families use the entrypoint's common source mapping, editable-source retention and separate structural/render/visual checks. Select only the families needed to answer the engineering question; a complete design is not established by producing every diagram type.
```

## File: skills/mbse-diagramming/references/import-contract.md
size: 2279
sha: b0a99be994aee4d2b10e545834bcbef55b9a0d5a
upstream: https://github.com/dynamicalsystemsgroup/mbse_skills/blob/main/skills/mbse-diagramming/references/import-contract.md

````text
# Diagram import contract

Use [import_view.py](../scripts/import_view.py) to extract a deliberately small
structural subset into JSON before redrawing. It reads at most 1 MiB, records
source/helper hashes and preserves raw labels as inert strings. It executes no
links, callbacks or imported styles. Renderers must escape labels themselves.

Supported inputs:

- Mermaid `flowchart`/`graph` with direction, quoted rectangular node labels,
  single simple edges `-->` or `-.->` with optional `|label|`, isolated nodes,
  line comments and single-line `accTitle`/`accDescr` metadata. Metadata is
  retained, not treated as an edge. Each statement occupies its own line.
- Uncompressed Draw.io `mxGraphModel`, either directly or inside one
  `mxfile/diagram`. Vertex cells, edge endpoints/labels and parent groups are
  retained. Cell styles and geometry are not imported; raw XML is retained as
  the source authority. HTML labels remain raw strings, not executable markup.

Unsupported constructs fail the whole extraction with a diagnostic; no partial
representation is certified. This includes compressed/multi-page Draw.io,
embedded PNG/SVG, Mermaid sequence/state diagrams, subgraphs, chained edges,
HTML directives, multiline metadata and richer shapes. Use an existing native
tool for those inputs and record its version/export instead of stripping
content until this helper accepts it. This subset is not a general Mermaid
parser, a Draw.io round-trip editor or formal UML/SysML interchange.

The output representation contains nodes, edges, accessibility metadata and
provenance. Edges record source/target, label and line style; nodes record IDs,
labels and group ownership. Stable edge IDs are extraction-local and tied to
the source hash, not authoritative model relationship IDs. Compare topology
and labels before styling, and build the [fidelity ledger](view-contract.md)
for any subsequent aggregation. An extracted group is ownership information,
not automatically a subsystem or a SysML package.

Example from the repository root:

```bash
python3 skills/mbse-diagramming/scripts/import_view.py examples/visualization/rover-energy.mmd --format mermaid > .local/rover-view.json
```

The command prints JSON; choose a new output path to preserve earlier evidence.
````

## File: skills/mbse-diagramming/references/semantic-patterns.md
size: 1539
sha: fbc8fd8d2cc5aaeabdc07176c756e19b7686f968
upstream: https://github.com/dynamicalsystemsgroup/mbse_skills/blob/main/skills/mbse-diagramming/references/semantic-patterns.md

```text
# Engineering semantic patterns

Select a pattern by the question the view answers, then choose its layout.
These are explanatory conventions, not a replacement for a methodology.

| Question | Pattern and required content |
| --- | --- |
| Where does demand exceed capacity? | Show producers, queue/resource, consumer and capacity/demand units. Label overflow or rejected work, distinguishing modeled limits from observations. |
| What authorizes progression? | Show lifecycle stages with entry inputs, exit criteria, decision authority and resulting evidence. Mark pending gates explicitly. |
| Where did a requirement come from? | Link raw need, interpretation, proposed requirement and acceptance criterion. Preserve source IDs, unresolved ambiguity and stakeholder authority. |
| Why do two verification results differ? | Align the same input/model identity and check scope, then show each operation and the first observed divergence. Preserve unsupported, undecided, unavailable and not-run independently of violations. |
| What crosses an ownership boundary? | Name owners, interface, exchanged item, direction and permitted/forbidden interactions with source references. A drawn boundary is not evidence of enforcement. |

For paired engine views, differing tool capability is not automatically a
model defect. Separate a native diagnostic from an interpretation, and expose
missing operations rather than inventing equivalent results. For stage gates,
a check passing does not authorize approval; show the actual decision record.
```

## File: skills/mbse-diagramming/references/tools.md
size: 4185
sha: cdd46d71a1d58dae65860dc43fc624a00209b596
upstream: https://github.com/dynamicalsystemsgroup/mbse_skills/blob/main/skills/mbse-diagramming/references/tools.md

```text
# Diagram tool contracts

Consult only the branch selected for this task. Documentation reviewed 2026-10-10; live documentation can change and is not a pinned tool installation.

## Mermaid

Use [flowchart syntax](https://mermaid.js.org/syntax/flowchart.html), [sequence syntax](https://mermaid.js.org/syntax/sequenceDiagram.html) or [state syntax](https://mermaid.js.org/syntax/stateDiagram.html) according to the view. Stable IDs should be separate from quoted human labels. Reserved words, special characters and labels need the renderer's documented escaping; do not interpolate arbitrary source text into syntax unchecked.

An existing [Mermaid CLI](https://github.com/mermaid-js/mermaid-cli) can render `mmdc -i view.mmd -o view.svg`. Record the CLI/library versions from the selected installation. A Markdown host's ability to display Mermaid does not prove it supports the same syntax or exports. Keep external links, callbacks and HTML labels out unless the requested use needs them and the host permits them.

## Graphviz

The official [DOT language](https://graphviz.org/doc/info/lang.html) distinguishes directed graphs (`digraph` with `->`) from undirected ones. Label edges rather than inferring meaning from direction alone. Use quoted strings for labels and consult the documented escaping rules. Clusters group nodes visually; their meaning must be named in a legend.

With an existing installation, `dot -Tsvg view.dot -o view.svg` renders an SVG; `dot -V` reports its version. See [command syntax](https://graphviz.org/doc/info/command.html). A successful parse does not establish the source-to-view mapping.

## Optional Archify handoff

If Archify is already available and the user wants an explorable standalone HTML view, read that installation's `SKILL.md` and the selected mode schema. Convert meaning and topology into its typed candidate; preserve source evidence and exact version. Run its supported `finalize` contract and retain the artifact-bound receipt. A plain Mermaid/DOT render is not an Archify finalization.

Archify is an optional separately installed tool, not a catalog prerequisite or bundled dependency. This collection has no automatic install, update check or copied HTML runtime. An explanatory drawing is not an automatic SysML diagram export, round-trip editor or interchange implementation.

## Companion evidence convention

Record view purpose, authoritative inputs and hashes, stable node/edge-to-source mapping, status (proposed/observed/accepted with authority), aggregation and omissions, tool versions/commands, output hashes and separate structural/render/visual-review outcomes. Source hashing identifies bytes; it does not verify their truth or endorsement. Layout-only edits should preserve IDs, endpoints, labels and mapping.

## UML and PlantUML handoff

When the request requires UML notation, identify the selected diagram family and preserve its relationship semantics, multiplicities, guards and ordering. An informal component map should be labeled explanatory rather than formal UML. Use the official [UML specification page](https://www.omg.org/spec/UML) for exact language claims and [PlantUML CLI documentation](https://plantuml.com/command-line) for operations supported by the chosen local version.

If a Mermaid, UML or PlantUML skill is already available, read its entrypoint and the relevant resources for syntax/rendering instead of reimplementing its general tooling. Inspected candidates include `softaworks/agent-toolkit` Mermaid, `SpillwaveSolutions/plantuml`, and the UML skill in `openai/plugins`' build-web-data-visualization package. They have different dependencies, scopes and licensing evidence; select deliberately and keep the MBSE source/evidence contract here. The OpenAI entrypoint relies on companion package resources and should not be copied alone. No native PlantUML runtime was tested for this starter.

Preserve authoritative source and evidence when an external skill suggests deleting intermediate files. Its installation examples do not authorize global installs or dependency changes. A tool's class/sequence shapes do not by themselves establish UML or SysML semantic conformance.
```

## File: skills/mbse-diagramming/references/view-contract.md
size: 3791
sha: 3c675a5d280b143a7c784218f86731481deb441d
upstream: https://github.com/dynamicalsystemsgroup/mbse_skills/blob/main/skills/mbse-diagramming/references/view-contract.md

```text
# Output and fidelity contract

Use this contract before laying out a view, including imported diagrams. These
are collection conventions, not SysML/UML rules.

## Destination

Record format (editable source plus SVG/PNG/HTML as needed), audience, question,
destination dimensions and detail level. Useful starting canvases are 960×600
for an inline document, 1280×720 for a wide document and 1920×1080 for a slide.
Select dimensions for the actual destination; these are defaults, not limits.
For print, record physical dimensions and inspect at that size. Judge text at
the displayed size, not just SVG coordinates: a 24-unit label on a 1920-wide
canvas becomes 12 pixels when displayed at 960 pixels. Split overview/detail
views when fitting everything requires unreadable labels.

## Fidelity ledger

Retain a companion JSON or Markdown ledger with:

- Source file/revision or hash, chosen source slice and proposed/observed status.
- Source and drawn node/relationship counts for that slice; counts outside the
  slice are unknown unless actually measured.
- Mapping from every drawn element to source IDs or explicit proposed IDs.
- Merged instances and collapsed groups, with all member IDs and rationale.
- Omitted nodes/relationships, their IDs and reasons; an empty list means none.
- Preserved direction, guards, exchanged items, cardinalities and boundaries.
- Separate structural, native-render, geometry, visual and semantic check records.

Counts are a reconciliation aid, not proof of completeness. A merged group can
preserve members in the ledger while hiding relationships in the overview;
record those hidden relationships and provide a detail view when material.
Changing an engineering relationship requires a separately identified model
decision. Layout simplification alone supplies no authority for that change.

## Layout and accessibility review

Inspect the actual export at its destination size. Record passed, failed or
not-run per check and name the reviewer/tool and artifact hash.

- Labels fit their shapes and do not collide with unrelated labels, nodes or
  connectors. A 6–10 pixel gap at display size is a useful starting target.
- Connectors attach to the intended endpoints; separate parallel connectors
  enough to read labels (12 pixels is a starting target). Avoid crossing an
  unrelated node; distinguish a crossing from a junction explicitly.
- Guards, sequence fragments, boundary names and legends remain readable.
  A legend sits outside the data region rather than covering evidence.
- Color has a companion label, line pattern or shape. Static content conveys
  the full meaning; motion is optional and supports reduced-motion preferences.
- Standalone SVG has a nonempty title and description with diagram-prefixed
  IDs and `role="img"`/`aria-labelledby` references. Use an additional instance
  prefix when embedding the identical SVG more than once.

The bundled [SVG checker](../scripts/svg_check.py) checks a bounded static SVG
markup/accessibility contract. It does not measure text bounds, detect visual
collisions, validate HTML/CSS animation or establish model semantics. Geometry
review remains manual unless an actual renderer-specific check is available.

## Optional project style

If the project has visualization tokens, read its selected file before styling.
Otherwise choose readable local defaults without a branding approval gate.
A project may keep `docs/diagram-style.json` with canvas/text/accent colors,
local font stack and destination sizes. Record the profile's hash in the view
receipt. Treat it as inert data; never execute profile content or alter an
installed skill's global configuration. Use shapes/line styles consistently
with engineering meaning and keep external fonts optional for offline export.
```

## File: skills/mbse-diagramming/agents/openai.yaml
size: 122
sha: 18c538d0d9ae125b24325cd327e704e7183bb38e
upstream: https://github.com/dynamicalsystemsgroup/mbse_skills/blob/main/skills/mbse-diagramming/agents/openai.yaml

```text
interface:
  display_name: "MBSE Diagramming"
  short_description: "Source-linked Mermaid and Graphviz engineering views"
```

## File: skills/mbse-diagramming/LICENSE
size: 11358
sha: d645695673349e3947e8e5ae42332d0ac3164cd7
upstream: https://github.com/dynamicalsystemsgroup/mbse_skills/blob/main/skills/mbse-diagramming/LICENSE

```text

                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright [yyyy] [name of copyright owner]

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
```

## File: skills/mbse-diagramming/NOTICE
size: 385
sha: 475b6dd9daa6f08b88db86ac72db4cc2606fd11b
upstream: https://github.com/dynamicalsystemsgroup/mbse_skills/blob/main/skills/mbse-diagramming/NOTICE

```text
MBSE agent skills
Copyright 2026 Dynamical Systems Group contributors.

Original material is licensed under the Apache License, Version 2.0.
See LICENSE. Referenced standards and external tools retain their own terms.
No upstream skill source code or standards corpus is bundled.

Source and provenance notices:
https://github.com/DynamicalSystemsGroup/mbse_skills/blob/main/NOTICE.md
```

## File: README.md
upstream: https://github.com/dynamicalsystemsgroup/mbse_skills/blob/main/README.md

````text
<div align="center">

<h1>MBSE agent skills</h1>

<p>Systems engineering skills guided by a mission-critical engineering ethos.<br>Explicit assumptions. Traceable decisions. Reviewable evidence.</p>

[![Repository checks](https://github.com/DynamicalSystemsGroup/mbse_skills/actions/workflows/checks.yml/badge.svg?branch=main)](https://github.com/DynamicalSystemsGroup/mbse_skills/actions/workflows/checks.yml)
[![License: Apache-2.0](https://img.shields.io/badge/license-Apache%202.0-2563eb?style=flat)](LICENSE)
[![Status: early draft](https://img.shields.io/badge/status-early%20draft-f59e0b?style=flat)](docs/share-readiness.md)
[![Python: 3.11+](https://img.shields.io/badge/python-3.11%2B-3776ab?style=flat&logo=python&logoColor=white)](pyproject.toml)
[![SysML v2: partial coverage](https://img.shields.io/badge/SysML%20v2-partial%20coverage-0f766e?style=flat)](docs/collection-architecture.md)

<p><a href="docs/first-task.md">First task</a> &middot; <a href="docs/skill-guide.md">Choose a skill</a> &middot; <a href="docs/distribution.md">Installation &amp; support</a> &middot; <a href="CONTRIBUTING.md">Contribute</a></p>

</div>

Develop engineering artifacts with **reliability, traceability, auditability and clear communication** as explicit goals. This collection helps your chosen agent turn engineering questions into reviewable requirements, architecture, verification plans and change-impact reports.

**16 skills** cover core systems engineering practices, with optional OOSEM, SysML v2/KerML and visualization extensions. The core works with prose and tables; SysML and an engine are optional.

## Explore the skills ecosystem

[Interactive bubble map](docs/diagrams/ecosystem-bubbles.html) · [Full-size SVG](docs/diagrams/ecosystem-bubbles.svg) · [Sources and maintenance](docs/diagrams/README.md)

![MBSE skills ecosystem: human responsibility surrounded by skills, methodology profiles, proposed agent roles and unimplemented method candidates](docs/diagrams/ecosystem-bubbles.svg)

Explore all **16 skills and 14 related concepts**. Select a category to zoom, search by name or purpose, and filter available skills, profile conventions, human responsibility, proposed roles or unimplemented methods. Each entry links to its source and states its limitations. Download the HTML and open it in a browser; GitHub displays HTML source.

The map groups entries for browsing; it does not change catalog layers or define execution dependencies. Circle sizes are decorative. Profiles are project-owned conventions, and the dashed agent/method bubbles represent proposals or gaps rather than shipped implementations.

**Engineers remain responsible.** Skills and agents support engineering judgment. When an unresolved assumption, acceptance criterion or source of authority could change the result, they should ask for clarification rather than silently decide. Changed engineering artifacts require review by the responsible human before adoption; passing checks or agreement among agents do not establish acceptance. Drafting and investigation can continue within the authorized scope while dependent decisions remain open.

## Engineering principles

The collection takes its direction from the discipline required for mission-critical systems: make obligations explicit, expose uncertainty, preserve evidence and keep engineering decisions accountable.

| Principle | What it means in the artifacts |
| --- | --- |
| Reliability and assurance | Measurable obligations, explicit operating assumptions, bounded checks and visible failure or inconclusive outcomes |
| Traceability | Stable identities and relationships from needs and assumptions through requirements, architecture, checks and evidence |
| Auditability | Source references, decision status, native observations and artifact identities that a reviewer can inspect |
| Reproducibility and configuration control | Recorded model/tool versions, preserved inputs and explicit review of stale evidence after changes |
| Clear engineering communication | Audience-appropriate views, units, system boundaries and an explanation of what each result establishes |
| Verification and validation | Separate evidence that a stated obligation is met from evidence that the system serves its intended use |
| Human accountability | Proposed agent outputs remain distinct from decisions made by identified engineering authorities |

Read [the engineering principles and review questions](docs/engineering-principles.md). This early-draft collection supports these practices; it is not a qualified toolchain, safety case or evidence that a system is ready for mission-critical use.

## Start here

| You want to… | Start with |
| --- | --- |
| Complete your first engineering task | [Engine-free walkthrough](docs/first-task.md) |
| Find the right skill for existing work | [Task-based skill guide](docs/skill-guide.md) |
| Inspect an end-to-end example | [Rover project and retained evidence](examples/team-onboarding/README.md) |
| Configure local model checks | [Engine setup and development](docs/development.md#configure-and-run-engines) |
| Find engines, editors or model services | [Awesome SysML v2 & MBSE](https://github.com/DynamicalSystemsGroup/awesome-sysmlv2-mbse) |

## Install and try a first task

Onboarding has three steps: **copy the skills into your project, ask the setup skill to record your conventions, then choose one engineering task**. Start with Markdown and tables; add a modeling language or engine when the task needs it. Setup adapts an established project's conventions and can use the editable starter for a new project.

When your team's practice is unresolved, setup starts by asking what you follow today, then offers **tailored core practices**, the **bounded OOSEM adaptation**, or **your existing team process**. It records the selection and tailoring in your project conventions. ICONIX and other unimplemented methodologies remain visible as coverage gaps, rather than ready-made options. Installation alone does not launch this interview; invoke setup in your chosen agent.

Requires Node.js/npm for installation. From your target engineering project:

```bash
npx skills@1.7.0 add DynamicalSystemsGroup/mbse_skills --agent codex --skill '*' --copy
```

This copies all 16 skills into project-local `.agents/skills`. Version 1.7.0 is the tested installer. No repository clone or Python environment is needed for installation. Then ask your agent:

> Use setup-mbse-skills to configure this project for an illustrative rover energy-budget task. Use Markdown and tables, with tools unconfigured. Record the system boundary, assumptions, requirements and evidence conventions, then identify one requirement to develop with mbse-requirements. Keep all engineering choices proposed until reviewed.

For your own project, start with: **“Use setup-mbse-skills to learn our engineering practice, show the supported methodology choices, and tailor the project conventions and first task to our selection.”** Existing choices are preserved; setup asks about missing decisions one main question at a time.

Follow [the first-task walkthrough](docs/first-task.md) for the inputs, next prompt, expected files and completion checks. Selective installation, plugin and manual-copy alternatives are in [distribution and onboarding](docs/distribution.md).

## Customize for your team

The copied skills are ordinary editable files. Choose the practices you need and adapt them to your project; you can begin with a single task without adopting the entire workflow.

| Customize | Where to make the choice |
| --- | --- |
| Document locations, IDs, vocabulary and review responsibilities | Project-owned conventions, normally `docs/mbse-project.md` |
| Methodology and model representation | Select core practices and optional extensions in the [task guide](docs/skill-guide.md); prose and tables remain valid |
| Evidence storage, verification expectations and existing tools | Project conventions, with lo
````
