Skip to content

Requirement Diagram

Last updated:

Mermaid Studio provides language support for SysML-style requirement diagrams inside IntelliJ IDEA and other JetBrains IDEs. Requirement diagrams document and visualize system requirements, their relationships, and how they are satisfied by design elements, which is valuable for requirements traceability in engineering projects.

Syntax highlighting integrates directly with IntelliJ’s color scheme system, so diagram colors always match your editor theme.

Requirement diagram syntax highlighting in Armada Dark theme

The summary below shows the IDE support Mermaid Studio ships for requirement diagrams, grouped by capability.

IDE feature supportSelect a feature for its description.
Editing
Code Intelligence
Validation
Refactoring
Navigation & Docs
Preview
Visual Editing

A set of 15 context-aware live templates scaffolds the six requirement variants, element blocks, and the seven relationship verbs. Type a short abbreviation, accept it from the completion popup, and tab through the template variables.

Individual abbreviations can be toggled under Settings > Tools > Mermaid Studio > Live Templates in the Requirement Diagram group. See Live Templates for the cross-cutting mechanics (triggering, contextual visibility, configuration).

The six requirement-variant templates share the same body shape (id, text, risk, verifymethod). risk and verifymethod are populated from enum() pickers, so Tab walks you through valid values.

AbbreviationExpansion
reqGeneric requirement declaration
reqffunctionalRequirement
reqiinterfaceRequirement
reqperfperformanceRequirement
reqphyphysicalRequirement
reqdcdesignConstraint
AbbreviationExpansion
elemelement declaration with type and docRef

The generic rel template uses a verb picker so you can choose any of the seven relationship verbs on insert. The seven hard-coded templates pre-pick the verb for you.

AbbreviationExpansion
relRelationship with verb picker
relssatisfies relationship
relttraces relationship
relccontains relationship
reldderives relationship
relrrefines relationship
relcpcopies relationship
relvverifies relationship

Requirement types:

  • requirement - Functional requirement
  • functionalRequirement - Functional requirement (explicit)
  • performanceRequirement - Performance constraint
  • interfaceRequirement - Interface specification
  • physicalRequirement - Physical constraint
  • designConstraint - Design limitation

Requirement properties:

requirementDiagram
requirement Example {
id: REQ-002
text: Description of the requirement
risk: low
verifymethod: analysis
}

Risk levels: low, medium, high

Verification methods: analysis, inspection, test, demonstration

Relationship types:

  • - satisfies -> - Element satisfies requirement
  • - traces -> - Requirement traces to another
  • - contains -> - Requirement contains sub-requirements
  • - derives -> - Requirement derives from another
  • - refines -> - Requirement refines another
  • - copies -> - Requirement copies another
  • - verifies -> - Element verifies requirement

For the complete syntax reference, see the Mermaid.js Requirement Diagram documentation.