Skip to content

[fusa-qual-wg] Add Workflow Views and Graph Generator - #38

Open
ZakyHermawan wants to merge 8 commits into
llvm:mainfrom
ZakyHermawan:main
Open

ZakyHermawan wants to merge 8 commits into
llvm:mainfrom
ZakyHermawan:main

Conversation

@ZakyHermawan

Copy link
Copy Markdown

Description

  • Added Mermaid graphs for three of our workflow views.
  • Added a Python graph generator script that converts *.mmd files to *.png images.

Proposed Mermaid Conventions

We don't have an official styling convention for Mermaid yet, so I applied the following rules to keep things clean:

  1. Separate definitions: Keep node definitions grouped together at the top.
  2. Short identifiers: Use 1-2 letter node identifiers (e.g., A, B) to make the connection logic easier to read.
  3. Clean edges: Edge annotations should be simple and concise to minimize visual clutter. Because they don't need styling, double quotes aren't necessary.

Note: Some styling or HTML elements might break the Mermaid file, so it is best to keep node text containing them wrapped in double quotes.

Signed-off-by: ZakyHermawan <zaky.hermawan9615@gmail.com>
@uwendi

This comment was marked as resolved.

@uwendi uwendi closed this Jul 14, 2026
@uwendi uwendi reopened this Jul 14, 2026
@slotosch

Copy link
Copy Markdown

Hi,
Nice graphs!
But the decision about "confidence" is twice in the graph (decision nodes)

  1. "Needed?"
  2. "Confidence in the tool needed?"
    The second one should be renamed to "Qualification of the tool needed?"

@uwendi

This comment was marked as outdated.

@petbernt petbernt left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking directory-structure question: the current flat hierarchy mixes Mermaid sources, generated images, the rendering script, dependency metadata, and documentation in one directory.

Would it be useful to separate these concerns? For example:

workflows/
├── README.md
├── mermaid/
│   └── *.mmd
├── scripts/
│   └── graph_generator.py
├── tests/
│   └── test_graph_generator.py
└── generated/       # untracked, if retained

The exact structure is not important, but agreeing on a convention now may help keep this area manageable as more workflows and tooling are added.

Comment thread fusa-qual-wg/tools/workflows/graph_generator.py Outdated
Comment thread fusa-qual-wg/tools/workflows/graph_generator.py Outdated
Comment thread fusa-qual-wg/tools/workflows/graph_generator.py Outdated
Comment thread fusa-qual-wg/tools/workflows/graph_generator.py Outdated
Comment thread fusa-qual-wg/tools/workflows/README.md Outdated
Comment thread fusa-qual-wg/tools/workflows/graph_generator.py Outdated
B[/"Assumptions"/]
C{"Is the software tool used to support a safety-related activity or task?"}
D{"Does the activity or task rely on the correct functioning of the software tool?"}
E["Are the relevant outputs completely and sufficiently examined or verified for the applicable process step(s)?"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This question has Yes/No branches but is rendered as a process rectangle.

I think it should use curly brackets "{ }" instead of square brackets like the other questions.

D{"Does the activity or task rely on the correct functioning of the software tool?"}
E["Are the relevant outputs completely and sufficiently examined or verified for the applicable process step(s)?"]
F["Yes, need to demonstrate tool usage confidence"]
G["No need, but provide an formal argument or a disclaimer"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This outcome appears to correspond to TPL-006, which uses the term “Safety Considerations” rather than “Disclaimer”. Should the terminology be aligned here?

Also, “an formal” should be “a formal”

subgraph Info [" "]
direction TB
L1["<b><i><u>References:</u></i></b><br/><b style='color:#E36C0A'><i>IEC 61508 Part 3 - Annex H</i></b><br/><i>ISO 26262 Part 8 - Chapter 11</i>"]
L2["<i>See also slides 11 to 14 in AsiaLLVM 2025's <span style='color:#0563C1; text-decoration:underline;'>presentation</span></i>"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest removing this reference from the flowchart.

“See also slides 11 to 14 in AsiaLLVM 2025’s presentation” does not identify the presentation title, presenter, or provide a link, so a reader cannot reliably locate the source.

C["Check the need to provide evidence of tool usage confidence" <br/> <span style='color:blue'>LLVM-QUAL-TPL-001</span>]
D{"Needed?"}
E["Provide argument / justification" <br/> <span style='color:blue'>LLVM-QUAL-TPL-006</span>]
F["Define usage of the tool for the specific project[4]"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In tool_usage_confidence_for_developers.mmd, the “Needed?” Yes branch goes to “Write plan of usage” and references LLVM-QUAL-TPL-002 - Tool Usage Plan.

This node performs the equivalent project-specific usage step but does not reference LLVM-QUAL-TPL-002. Since PR #48 describes the template as applicable to both tool providers and tool users, is the omission intentional?

png.

The reference does not identify the presentation title, presenter, or
provide a link, so a reader cannot reliably locate the source.

Signed-off-by: ZakyHermawan <zaky.hermawan9615@gmail.com>
To prevent potentially stale output.

Signed-off-by: ZakyHermawan <zaky.hermawan9615@gmail.com>
We use argparse to replace sys.argv. Add --source-dir and --output-dir to override default behavior on
input/output directories. Also remove OUTPUT_DIR from global variable.

Signed-off-by: ZakyHermawan <zaky.hermawan9615@gmail.com>
Also remove unnecessary matplotlib and Pillow from requirements.txt

Signed-off-by: ZakyHermawan <zaky.hermawan9615@gmail.com>
…ary libraries in requirements.txt

Signed-off-by: ZakyHermawan <zaky.hermawan9615@gmail.com>

@uwendi uwendi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My comments here.

Comment thread fusa-qual-wg/tools/workflows/graph_generator.py Outdated
Comment thread fusa-qual-wg/tools/workflows/requirements.txt Outdated
Comment thread fusa-qual-wg/tools/workflows/README.md
Comment thread fusa-qual-wg/tools/workflows/graph_generator.py Outdated
Comment thread fusa-qual-wg/tools/workflows/README.md Outdated
Comment thread fusa-qual-wg/tools/workflows/README.md Outdated
Comment thread fusa-qual-wg/tools/workflows/README.md Outdated
Comment thread fusa-qual-wg/tools/workflows/README.md Outdated
@uwendi

uwendi commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

@ZakyHermawan :

While reviewing #57, @petbernt noticed that the workflows still refer to LLVM-QUAL-TPL-003 as the Tool Evaluation Report. During the preparation of TPL-003, we settled on Tool Classification Report: evaluation by analysis is the activity, while classification is its documented result.

For consistency of the whole family of templates, could you please update the wording in tool_usage_confidence_for_developers.mmd and tool_usage_confidence_for_users.mmd? Thank you!

@ZakyHermawan

Copy link
Copy Markdown
Author

I have address all reviews, check the last commit message for list of changes.

However, before merging this PR, I got one question, on tool_usage_confidence_for_developers.mmd, there is "Provide means for verification of appropriate usage", then it will reference to LLVM-QUAL-TPL-005, which is a template for "Safety Manual", should it be changed to "Provide Safety Manual" to match the term used in TPL, or just let it be ?

I am not sure about this, because it looks like we are forcing people to actually write a safety manual, which I suppose it is allowed to be in other form, other than safety manual. Not sure what it is, but usually standard did not force people to do things in certain way.

@slotosch

Copy link
Copy Markdown

I have address all reviews, check the last commit message for list of changes.

However, before merging this PR, I got one question, on tool_usage_confidence_for_developers.mmd, there is "Provide means for verification of appropriate usage", then it will reference to LLVM-QUAL-TPL-005, which is a template for "Safety Manual", should it be changed to "Provide Safety Manual" to match the term used in TPL, or just let it be ?

I am not sure about this, because it looks like we are forcing people to actually write a safety manual, which I suppose it is allowed to be in other form, other than safety manual. Not sure what it is, but usually standard did not force people to do things in certain way.

These are two different things

  1. Safety Manual States what needs to be done
  2. Safe Usage Report (at least we call it like this) is the evidence that the the Safety Manual was followed
    Typically 1. is task of tool qualifier, while 2. is task of the tool user.

Based on past discussion, we decided to remove graph generator because
GitHub already renders them.

Below is the complete list of the changes.
1. Remove the graph generator and anything that relates to it.
2. Remove the reference to Asia LLVM because reader cannot reliably locate
   the source.
3. Use "Tool Usage Plan" on the output edge of "Needed ?" node, for users
   and developers, to make it consistent.
4. Replace the term "disclaimer" with "Safety Considerations"
   and reference it to TPL-006.
5. Replace "Tool Evaluation Report" with "Tool Classification Report"
   to make it consistent with TPL-003.
6. Use bold for Tools List, Tool Usage Plan, Tool Classification Report,
   Tool Qualification Report, and Safety Considerations to provide
   more emphasis for the term that is used on the corresponding reference.

Signed-off-by: ZakyHermawan <zaky.hermawan9615@gmail.com>
@ZakyHermawan

Copy link
Copy Markdown
Author

@slotosch thanks for the explanation, I will not change the wording (keep it as "Provide means for verification of appropriate usage"), since changing it will alter the meaning.

@ZakyHermawan

Copy link
Copy Markdown
Author

Btw, please ignore my force push, I accidentally deleting the root README.md, when I when I tried to restore it, I to got some line endings diff problems between clrf and lf 🤣

@uwendi

uwendi commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

I have address all reviews, check the last commit message for list of changes.

However, before merging this PR, I got one question, on tool_usage_confidence_for_developers.mmd, there is "Provide means for verification of appropriate usage", then it will reference to LLVM-QUAL-TPL-005, which is a template for "Safety Manual", should it be changed to "Provide Safety Manual" to match the term used in TPL, or just let it be ?

I am not sure about this, because it looks like we are forcing people to actually write a safety manual, which I suppose it is allowed to be in other form, other than safety manual. Not sure what it is, but usually standard did not force people to do things in certain way.

Thank you for raising this, @ZakyHermawan. I agree with keeping the broader wording rather than changing it to “Provide Safety Manual.”

One clarification about the reference to TPL-005: the workflows and templates are informative, reusable starting points. They do not prescribe a mandatory process, document title, or document structure. A team may reuse a template as it is, adapt or combine it with existing documentation, use another title, and tailor the workflow according to its applicable standards, assurance context, and organizational or project processes.

TPL-005 is referenced here because it provides one structured way of communicating the user-facing information and verifiable conditions needed for appropriate tool usage. It does not mean that everyone must produce a separate document called a Safety Manual. The TPL-005 guide also explicitly allows the completed content to be published under another clear title and to reference existing controlled documentation instead of duplicating it.

“Provide information for appropriate and verifiable usage" would perhaps make the intended outcome slightly clearer while remaining independent of the particular document title. However, keeping the current broader wording is also acceptable.

Your question also suggests that we should explain the informative and tailorable nature of all the workflows and templates in the workflows README, so that it does not have to be inferred from each individual node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants