Merlive

Requirement diagrams

A requirement is a box that says what kind it is, a sentence of what it asks, and its id, risk and how it is verified. Held to the same measure.

Declared with requirementDiagram. Of 46 features Mermaid documents for a requirement diagram, 37 drawn as written, 9 drawn less something. See all 46 drawn both ways, or draw one yourself.

Mermaid
Requirement diagram, as Mermaid draws it
Merlive
Requirement diagram, as Merlive draws it

What is read

requirementDiagram is read into the same boxes and links as a flowchart, so everything else on this page holds for it: the rules, the design, Merlive's own lines. A requirement or an element is a box that says what it is over its name, lists the few things said of it as rows, and carries its text as the sentence about it.

WrittenRead as
requirement approval { … }A requirement: a box named by its name, with «requirement» over it
functionalRequirement, interfaceRequirement, performanceRequirement, physicalRequirement, designConstraintThe other five kinds of requirement, each said over the name: «functional requirement», «design constraint»
id: 1.1, risk: high, verifymethod: testRows under the name, always in that order: id: 1.1, risk: high, verify: test. Only those that were written are listed
text: Orders over the limit are approved.The sentence about the requirement, under its name. Read as Markdown and kept as plain words on one line
risk: Low, Medium, High; verifymethod: Analysis, Demonstration, Inspection, TestThe same, in small letters. Any other value is kept as written and said: Mermaid will not draw it
element approval_flow { … }An element: a box with «element» over its name
type: workflow, docref: docs/approval.mdAn element's rows: type: workflow, doc: docs/approval.md
Requirement, ID:, VerifyMethod:, DocRef:Mermaid's own words in any case, read as the same
id: "REQ-1.2 b", text: "Approved: by a manager, on the day", type: "word processor"A value in quotes, with what Mermaid would not take without them (a colon, a comma, a hyphen)
requirement "Order approval" {, requirement order approval {A name of several words, in quotes or not. In Merlive's own lines it is Order_approval: each character an id cannot hold is _
requirement "**Order** approval" {A name read as Markdown: its bold and italic are kept
approval_flow - satisfies -> approvalA relationship: a dotted link with an arrowhead at the second, and its word on it
contains, copies, derives, satisfies, verifies, refines, tracesThe seven relationships, in any case. contains is a solid line with a circle at the requirement that contains and no arrowhead
approval <- satisfies - approval_flowThe same relationship written from its other end: from approval_flow to approval
a-contains->b, a - refines -> aWith no spaces; from a requirement to itself
A relationship before the things it joins are declaredRead: each box is filled in when its declaration comes
A requirement or an element declared twiceThe first is kept, as Mermaid keeps it, and it is said. A name that is both is drawn as the element
classDef urgent …, class approval,limit urgent, requirement approval:::urgent {, approval:::urgentA kind for each box named, as in a flowchart. Of several classes (:::urgent,late) the first is the one a box is
style approval stroke:#c62828,stroke-width:4px, style a,"Buyer limit" …Outlines, as in a flowchart
direction TBThe way it runs. A requirement diagram is drawn top to bottom for now: any other direction is read past, and said once
%% words on a line of its own, or after the { that opens a thingA comment. After anything else %% is part of the words, as it is for Mermaid
title: in front matter, accTitle, accDescr, %%{init: …}%%As in a flowchart

Not read, each named in a note, line when met: something said of a requirement that only an element has, or the other way round; a thing with no { after its name, or with what is said of it on the same line; a bare name with a hyphen in it, which wants quotes; a relationship whose word is not one of the seven. A name that is in a relationship and never declared is drawn as a plain box, and said: Mermaid will not draw that diagram. A line that is none of the above is said with its line number and nothing is drawn from it.

Feature by feature

Every feature Mermaid’s own pages set out for a requirement diagram, each with a sample of it in the corpus. A sample is drawn when every box, link and word it has is read and every rule passes. Drawn, less something is the same with one thing known to be missing, named beside it.

FeatureResultWhat is missing
A requirement diagram: a requirement, an element, and how one bears on the otherDrawn
The six kinds of requirementDrawn
What is said of a requirement: its id, its text, its risk and how it is verifiedDrawn
What is said of a requirement, written in another orderDrawn
Requirements of which only some things are saidDrawn
The three risks: low, medium and highDrawn
The four ways to verify: analysis, demonstration, inspection and testDrawn
Mermaid's own words written with capitalsDrawn
A requirement and an element of which nothing is saidDrawn
An id with dots, and one of lettersDrawn
An id in quotesDrawn
A text in quotes, with a colon and a comma in itDrawn
A text written as MarkdownDrawn, less somethingBold and italic in a requirement's text are drawn as plain words
An element: its type and the document it points toDrawn
An element's type and document in quotesDrawn
Elements with a type or a document, not bothDrawn
The seven relationshipsDrawn
Relationships written from their other endDrawn
A requirement that contains othersDrawn, less somethingThe crossed ring Mermaid draws at the requirement that contains is drawn as a filled circle
Relationships written with no spacesDrawn
A relationship's word written with a capitalDrawn
A relationship from a requirement to itselfDrawn
A relationship written before what it joins is declaredDrawn
Names in quotes, of several wordsDrawn
Names of several words, without quotesDrawn
A name and a text in another alphabetDrawn
Names with a dot, and one that starts with a digitDrawn
A name written as MarkdownDrawn
A requirement declared twiceDrawn
Direction: top to bottomDrawn
Direction: left to rightDrawn, less somethingDrawn top to bottom: boxes of different heights are only placed that way yet
Direction: bottom to topDrawn, less somethingDrawn top to bottom: boxes of different heights are only placed that way yet
A class made with classDef and given to several with classDrawn
A class given with ::: where a thing is declaredDrawn
A class given with ::: to a name aloneDrawn
Several classes given at onceDrawn, less somethingA box is of one kind: of several classes, the first is the one it is
A default class for every requirementDrawn, less somethingThe default class is read past: the look is the design's
A requirement styled on its ownDrawn, less somethingIts outline is heavy and red as written, in the design's own red; its fill is the design's
Several styled in one line, one named in quotesDrawn, less somethingTheir outlines are broken and red as written, in the design's own red
A title in front matterDrawn
A title and a description for readers who cannot see itDrawn
A description over several linesDrawn
Comments: on lines of their own, and after the { that opens a requirementDrawn
A directive for Mermaid's own settingsDrawn, less somethingMermaid's own settings are read past: the look is the design's
Blank lines between and inside declarationsDrawn
A whole diagram: requirements of three kinds, two elements, and how they bear on each otherDrawn

Written from skills/merlive/reference.md in the repository, so the two cannot disagree.

Before: Entity diagramsNext: C4 diagrams