Skills › Scientific Agent Skills › markdown-mermaid-writing › requirement.md
requirement.md
97 lines · skills/markdown-mermaid-writing/references/diagrams/requirement.md at 5f2bc03
1<!-- Source: https://github.com/SuperiorByteWorks-LLC/agent-project | License: Apache-2.0 | Author: Clayton Young / Superior Byte Works, LLC (Boreal Bytes) -->
3# Requirement Diagram
5> **Back to [Style Guide](../mermaid_style_guide.md)** — Read the style guide first for emoji, color, and accessibility rules.
7**Syntax keyword:** `requirementDiagram`
8**Best for:** System requirements traceability, compliance mapping, formal requirements engineering
9**When NOT to use:** Informal task tracking (use [Kanban](kanban.md)), general relationships (use [ER](er.md))
11---
<!-- Source: https://github.com/SuperiorByteWorks-LLC/agent-project | License: Apache-2.0 | Author: Clayton Young / Superior Byte Works, LLC (Boreal Bytes) -->
Requirement Diagram
Back to Style Guide — Read the style guide first for emoji, color, and accessibility rules.
Syntax keyword: requirementDiagram Best for: System requirements traceability, compliance mapping, formal requirements engineering When NOT to use: Informal task tracking (use Kanban), general relationships (use ER)
Raw lines 1 to 12
13## Exemplar Diagram
15```mermaid
16requirementDiagram
17 accTitle: Requirement Traceability
18 accDescr: Illustrative requirements linked to design components; edges are claims to verify.
20 requirement high_availability {
21 id: 1
22 text: "System shall maintain 99.9 percent uptime"
23 risk: high
24 verifymethod: test
25 }
27 requirement data_encryption {
28 id: 2
29 text: "All data at rest shall be AES-256 encrypted"
30 risk: medium
31 verifymethod: inspection
32 }
34 requirement session_timeout {
35 id: 3
36 text: "Sessions expire after 30 minutes idle"
37 risk: low
38 verifymethod: test
39 }
41 element auth_service {
42 type: service
43 docref: "auth-service-v2"
44 }
46 element crypto_module {
47 type: module
48 docref: "crypto-lib-v3"
49 }
51 auth_service - satisfies -> high_availability
52 auth_service - satisfies -> session_timeout
53 crypto_module - satisfies -> data_encryption
54```
56---
Exemplar Diagram
requirementDiagram
accTitle: Requirement Traceability
accDescr: Illustrative requirements linked to design components; edges are claims to verify.
requirement high_availability {
id: 1
text: "System shall maintain 99.9 percent uptime"
risk: high
verifymethod: test
}
requirement data_encryption {
id: 2
text: "All data at rest shall be AES-256 encrypted"
risk: medium
verifymethod: inspection
}
requirement session_timeout {
id: 3
text: "Sessions expire after 30 minutes idle"
risk: low
verifymethod: test
}
element auth_service {
type: service
docref: "auth-service-v2"
}
element crypto_module {
type: module
docref: "crypto-lib-v3"
}
auth_service - satisfies -> high_availability
auth_service - satisfies -> session_timeout
crypto_module - satisfies -> data_encryptionRaw lines 13 to 57
58## Tips
60- Each requirement needs: `id`, `text`, `risk`, `verifymethod`
61- `id` may be text; quote punctuation-bearing values, for example `id: "REQ-001"`
62- Risk levels: `low`, `medium`, `high` (all lowercase)
63- Verify methods: `analysis`, `inspection`, `test`, `demonstration` (all lowercase)
64- Use `element` for design components that satisfy requirements
65- Relationship types: `- satisfies ->`, `- traces ->`, `- contains ->`, `- derives ->`, `- refines ->`, `- copies ->`, `- verifies ->`
66- Keep to **3–5 requirements** per diagram. A `satisfies`/`verifies` edge records a claimed relationship, not proof that a test passed
67- Quote free-text `text`, `id`, and `docref` fields, especially hyphens and percent signs
68- Use 4-space indentation inside `{ }` blocks
70---
Tips
- Each requirement needs:
id,text,risk,verifymethod idmay be text; quote punctuation-bearing values, for exampleid: "REQ-001"- Risk levels:
low,medium,high(all lowercase) - Verify methods:
analysis,inspection,test,demonstration(all lowercase) - Use
elementfor design components that satisfy requirements - Relationship types:
- satisfies ->,- traces ->,- contains ->,- derives ->,- refines ->,- copies ->,- verifies -> - Keep to 3–5 requirements per diagram. A
satisfies/verifiesedge records a claimed relationship, not proof that a test passed - Quote free-text
text,id, anddocreffields, especially hyphens and percent signs - Use 4-space indentation inside
{ }blocks
Raw lines 58 to 71
72## Template
74```mermaid
75requirementDiagram
76 accTitle: Requirement Traceability
77 accDescr: Illustrative requirements linked to design components; edges are claims to verify.
79 requirement your_requirement {
80 id: 1
81 text: "The requirement statement here"
82 risk: medium
83 verifymethod: test
84 }
86 element your_component {
87 type: service
88 docref: "component-ref"
89 }
91 your_component - satisfies -> your_requirement
92```
Template
requirementDiagram
accTitle: Requirement Traceability
accDescr: Illustrative requirements linked to design components; edges are claims to verify.
requirement your_requirement {
id: 1
text: "The requirement statement here"
risk: medium
verifymethod: test
}
element your_component {
type: service
docref: "component-ref"
}
your_component - satisfies -> your_requirementRaw lines 72 to 9495## Verified reference
97Syntax examples reviewed against [official Mermaid documentation](https://mermaid.js.org/syntax/requirementDiagram.html) and rendered with Mermaid 12.0.0 (2026-10-01). Check the destination version; appearance and accessibility are not guaranteed by a successful parse.
Verified reference
Syntax examples reviewed against official Mermaid documentation and rendered with Mermaid 12.0.0 (2026-10-01). Check the destination version; appearance and accessibility are not guaranteed by a successful parse.
Raw lines 95 to 97