Files
claude-scientific-skills/scientific-skills/markdown-mermaid-writing/references/diagrams/requirement.md
borealBytes 02e19e3df9 docs(references): port style guides, 24 diagram guides, and 9 templates from opencode
All content ported from borealBytes/opencode under Apache-2.0 license with
attribution headers prepended to each file.

- references/markdown_style_guide.md (~733 lines): full markdown formatting,
  citation, collapsible sections, emoji, Mermaid integration, and template
  selection guide
- references/mermaid_style_guide.md (~458 lines): full Mermaid standards —
  emoji set, classDef color palette, accessibility (accTitle/accDescr),
  theme neutrality (no %%{init}), and diagram type selection table
- references/diagrams/ (24 files): per-type exemplars, tips, and templates
  for all Mermaid diagram types
- templates/ (9 files): PR, issue, kanban, ADR, presentation, how-to,
  status report, research paper, project docs

Source: https://github.com/borealBytes/opencode
2026-02-19 18:25:20 -05:00

2.4 KiB
Raw Blame History

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)


Exemplar Diagram

requirementDiagram

    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_encryption

Tips

  • Each requirement needs: id, text, risk, verifymethod
  • id must be numeric — use id: 1, id: 2, etc. (dashes like REQ-001 can cause parse errors)
  • Risk levels: low, medium, high (all lowercase)
  • Verify methods: analysis, inspection, test, demonstration (all lowercase)
  • Use element for design components that satisfy requirements
  • Relationship types: - satisfies ->, - traces ->, - contains ->, - derives ->, - refines ->, - copies ->
  • Keep to 35 requirements per diagram
  • Avoid special characters in text fields — spell out symbols (e.g., "99.9 percent" not "99.9%")
  • Use 4-space indentation inside { } blocks

Template

requirementDiagram

    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_requirement