mantra

Manuel's ANforderungs-TRAcing

mantra is a tool for easier tracing between requirements, implementation, and tests.

Core Concepts

To use mantra, a system/project must document requirements in a way that allows automatic edits at a textual level. Wikis are a good way to achieve this, and most project management tools offer at least a lightweight wiki. mantra is primarily built to work together with the structure of the wiki-repo-template for GitHub wikis, but it should be relatively simple to adapt other wikis to use mantra.

Human-readable IDs are used to identify requirements, and reference them in the implementation and/or tests. These requirement IDs must be set manually on the implementation and test side. mantra then adds the number of references a requirement has on the implementation and test side to the wiki. Since systems/projects may have different branches, these numbers are linked to the branch mantra is run against.

Example:

```

myreqid: Some requirement title

References:

Requirement Structure

Every requirement must have a heading or title starting with a unique requirement ID followed by :. A requirement hierarchy may be used to create a structure of high and low-level requirements.

Example:

```

myreqid: Some requirement title

A high-level requirement.

myreqid.subreqid: Some sub-requirement title

A low-level requirement of my_req_id. ```

Referencing

Requirement IDs may be referenced in the implementation and/or tests of your system/project using the syntax [req:your_req_id]. This syntax should be independent enough in most programming languages that mantra could confuse an expression with a requirement reference.

Example:

rust /// This function does something. /// /// [req:my_req_id] fn my_function() { //... }

License

MIT Licensed