Skip to content

Conformance: the SysML requirement diagram ​

Release 0.25.0 (milestone 3, docs/diagrams/notes/milestone-3.md §6). Support is claimed by level (decision D3): render and edit on the subset below, and interchange with Mermaid's requirementDiagram (a reader and a writer). No XMI.

A view of a version-2 model ("schemaVersion": 2) whose diagram is "sysml.requirement" is a requirement diagram. It is drawn by lib/umlimator-all.js (umlimator/all), which the CLI's page inlines; lib/umlimator.js, what a map host loads, draws it as plain cards with a warning. The vocabulary is docs/diagrams/model.md §2, row 16; the example is examples/ebike-requirements.json.

The subset, and SysML v1.7's clauses ​

SysML v1.7 (formal/24-01-07): clause 16 (requirements), the non-normative extensions' annex (extendedRequirement's risk and verifyMethod) and Annex A (the frame and its header).

SysML v1.7In the modelDrawn as
16, «requirement»sysml.Requirement; props.reqId, props.texta classifier with «requirement» over its name and one compartment id = "EB-1.1", text = "…", the text wrapped at 224 px into as many rows as it needs (present.<id>.rows caps them, "+k more")
Mermaid's five other kindsprops.stereotypes (functionalRequirement, …)the kind over the name, beside «requirement»
Non-normative annex, extendedRequirementprops.risk (low, medium, high), props.verifyMethod (analysis, inspection, test, demonstration)rows when set
16, requirement containmenta requirement's parent, a requirement or a packagea requirement in a requirement: a derived line with a crosshair (⊕) at the owner's end, never stored; in a package: inside the package's box
16, «deriveReqt», «satisfy», «verify», «refine», «trace», «copy»sysml.DeriveReqt, sysml.Satisfy, sysml.Verify, sysml.Refine, sysml.Trace, sysml.Copy, client to suppliera dashed line, an open arrow at the supplier, its keyword
16, «testCase»sysml.TestCasea classifier with «testCase»
8, «block»sysml.Blocka classifier with «block», its name only (its compartments are the block definition view's)
16, «rationale», «problem»uml.Comment with the stereotypea note, the keyword leading its text
Annex A, the framethe view; its subject, a package or nonea frame with the pentagon header req [Package] Name [view title], or req [Model] <model title> [view title] with no subject

Rules (src/sysml/requirement.js), each with a passing and a failing fixture in tests/requirement.test.mjs:

RuleLevelSysML v1.7
requirement-nestederrorclause 16, «requirement»'s constraints: a classifier nested in a requirement is a requirement
requirement-memberserrorclause 16, «requirement»: no attributes, operations or ports of its own
requirement-generalerrorclause 16, «requirement»: it takes part in no generalization
requirement-associationerrorclause 16, «requirement»: it takes part in no association
requirement-typingerrorclause 16, «requirement»: it types no element
derive-ends, copy-endserrorclause 16, «deriveReqt» and «copy»: client and supplier are requirements
copy-texterrorclause 16, «copy»: the client's text is a read-only copy of the supplier's
satisfy-ends, verify-endserrorclause 16, «satisfy» and «verify»: the supplier is a requirement
requirement-ownerwarningnone: the subset's restriction (a requirement owned only by a requirement or a package), a departure
requirement-id, requirement-textwarningnone: what a reader expects (one id each, a text)
derive-cyclewarningnone: a requirement derived from itself through a chain says nothing
satisfy-from, verify-fromwarningSysML allows any named element as the client; a requirement satisfying, or anything but a test case verifying, is unusual
refine-ends, trace-endswarningone end is a requirement, as SysML's own uses of them
risk-value, verify-methodwarningthe non-normative annex's words

Clause 16's constraints are cited by stereotype, as the note does (§6.3); their sub-clause numbers were not quoted from the PDF in this build (a gap, below).

Departures from SysML v1.7:

  • Containment is drawn, not stored: the crosshair line is derived from parent and is no model element; deleting it re-homes the requirement to its owner's owner.
  • A requirement's owner is a requirement or a package: a restriction of the subset, not a SysML constraint (requirement-owner, a warning).
  • A frame with no subject names [Model], which Annex A allows, and the model file's title as if it were a Model element's name, which it is not.
  • copy-text fires after a text edited in the panel: the registry has no hook to keep the client's text read-only, so the problem says so and the author edits it back.

Left out ​

notes/milestone-3.md §17: requirement tables and matrices; callout notation (a note listing satisfiedBy); derived compartments on the box (they are in describe() and the PDF); requirement generalization (SysML forbids it); extendedRequirement's source and the other non-normative categories; a req frame whose element is a requirement. And copy and paste, XMI, allocations, views and viewpoints.

Layout limits, measured on examples/ebike-requirements.json and tests/requirement-stress.json:

  • Port repair and rerouting off (repair: false, reroute: false, §14). The type ranks by containment and the six relationships (owner above, or left of, what it contains), then lays out by the layered layout.
  • The example lays out clean right and down: check() finds nothing, in Node and in Chrome.
  • tests/sysml-fixtures.test.mjs pins the stress file. Its edge-cases view (containment four deep, a requirement in a package, a derive cycle, a copy with another text, a satisfy to a block, a duplicate id, a requirement with a member, a generalization between requirements, a 600-character text and one capped, a verify from a block, a «rationale», the five kinds, a 40-character name, a requirement with no text) crosses once, right and down; ec-package (the frame of a package subject) is clean. The generated all view (50 requirements, 60 relationships) crosses 204 times right and 233 down, with one finding right and three down (lines sharing a track, labels on lines: six «verify» and «satisfy» labels found no spot and were left off with nothing said before audit 6, drawn now; one of them placed again off its line in audit 32); no line runs through a node.

Writers: what each shows of a requirement diagram ​

Measured on examples/ebike-requirements.json (0.25.0); the PDF's text read back by tests/cli.py.

What is drawnSVG: handle.toSVG(), umlimator.py stillsPNG: handle.toPNG(), umlimator.py stillsPDF: umlimator.py pdfMermaid: writeMermaidRequirement
Requirements, their id and textYes, the text wrapped (a capped one ends "+k more")YesYes, in vectors; the tables give the text wholeYes, each kind, id, text, risk, verifymethod
The frame and its headerYes, the header cut to the frameYesYesNo: Mermaid has no frame
ContainmentThe crosshair linesYesYes; "contains", "contained in" rowscontains
The six relationshipsYes, each with its keywordYesYes; each element's rows say them both waysYes, forward
Blocks and test casesYes, by nameYesYeselement with type: Block or type: TestCase; their other props lost
Comments and their links, packagesYesYesYesNo: reported as not written
DirectionYesYesYesTB or LR; BT and RL read back as TB and LR
Quotes and line breaks in names and textsYesYesYesRemoved, carried whole in %% name: and %% text: comments the reader reads back
The legendNo: the legend is a piece of the pageNoYes, under the pictureNo
TextText, in the page's font family; not embedded unless fontCSS is givenPixelsSelectable textText
Accessible namesEach node's aria-label kept; the lines' <title> removedNoneNoneNone
TablesNoneNone"Elements": each requirement's id, text whole, risk, verify method and its relations both ways; a test case's or block's relations. "Lines": each relationship by its keywordNone

Accessibility ​

Every piece has a name: "Requirement Pedal assistance, EB-1.1: The motor shall assist the rider only while the rider is pedalling"; "Satisfy from block Controller to requirement Assistance cut-off". The reading order is the frame, then the cards rank by rank (down) or row by row (right), then the lines. Text reads at 4.5:1, lines and outlines at 3:1 in both themes (tests/requirement.html, tests/sysml.html); the page passes the axe rules the earlier pages run. Every gesture has a key (docs/editing.md).

Performance (P1) ​

tests/sysml-fixtures.test.mjs on tests/requirement-stress.json's all view (50 requirements, 60 relationships), CPU time, best of seven after a warm-up, on an Apple laptop under other agents' load (14 Nov 2026): a full layout and its SVG 561 ms; a requirement's text edited 590 ms, a satisfy added 543 ms, a containment line deleted 495 ms: over the 100 ms target, under CI's 1 s ceiling, which the test holds and prints (tests/requirement.test.mjs measures its own generated model alike). The type's own ranking runs inside each edit's time.

Tests ​

tests/requirement.test.mjs and tests/requirement.html (the look, the rules each passing and failing, every gesture by pointer and key, a 30-step session); tests/requirement-minimal.json and tests/requirement-stress.json with tests/sysml-fixtures.test.mjs and tests/sysml.html; tests/mermaid-requirement.test.mjs, tests/import.py; tests/cli.py; tests/mcp.py.

Gap: the clause numbers inside clause 16 and the annexes' letters were not quoted from SysML v1.7's PDF in this build (the file could not be read here); each rule cites its stereotype's constraint by name. Settling them is the next documents package's.