Skip to content
Requirement Diagram

A requirement diagram documents the requirements for a system and the relationships between them. Each requirement has an identifier, a description, a risk level, and a verification method. Requirements can be linked to show traceability (one requirement is related to another) or containment (one requirement includes another).

Requirement diagrams are useful in project planning and specification work — capturing what a website, product, or service must do before any build work begins.

requirementDiagram
    requirement personal_lists {
        id: 1
        text: "Visitors must be able to save a personal reading list"
        risk: high
        verifyMethod: test
    }
    requirement user_accounts {
        id: 2
        text: "Visitors must be able to create an account"
        risk: medium
        verifyMethod: test
    }
    requirement email_confirmation {
        id: 3
        text: "A confirmation email must be sent on sign-up"
        risk: low
        verifyMethod: test
    }
    functionalRequirement secure_passwords {
        id: 4
        text: "Passwords must be stored using a secure hash"
        risk: high
        verifyMethod: inspection
    }

    personal_lists - traces -> user_accounts
    user_accounts - contains -> email_confirmation
    user_accounts - contains -> secure_passwords

The diagram makes requirement dependencies explicit — if user_accounts changes, all the requirements it contains are affected too.

Syntax
MARKDOWN
```mermaid
requirementDiagram
    requirement personal_lists {
        id: 1
        text: "Visitors must be able to save a personal reading list"
        risk: high
        verifyMethod: test
    }
    requirement user_accounts {
        id: 2
        text: "Visitors must be able to create an account"
        risk: medium
        verifyMethod: test
    }
    requirement email_confirmation {
        id: 3
        text: "A confirmation email must be sent on sign-up"
        risk: low
        verifyMethod: test
    }
    functionalRequirement secure_passwords {
        id: 4
        text: "Passwords must be stored using a secure hash"
        risk: high
        verifyMethod: inspection
    }

    personal_lists - traces -> user_accounts
    user_accounts - contains -> email_confirmation
    user_accounts - contains -> secure_passwords
```

For more requirement diagram syntax see the requirement diagram documentation at mermaid.js.org

© 2026 Docizr. All rights reserved.