Skip to main content
Skip table of contents

Examples of Custom Actions using the Valiassistant

Here are some example scripts that can be implemented together with the Custom Actions. Whenever AI is indicated, the script uses a custom prompt that is sent together with information from the Requirements, Components or Valis to the AI, which analyzes the data and takes the custom prompt into consideration and sends an answer back to Valispace, which can then be written back to the object in Valispace. Feel free to adapt these example scripts to your needs and use-cases.

For these scripts to work in your Valispace instance you have to provide your Valispace URL in the configuration part of the script at the beginning.

AI Title Suggestion

This script uses AI to come up with a short but precise title for your individual requirements.

AI_Title_Suggestion.txt

The used custom prompt is:

CODE
custom_prompt = "Based on the Text provide a short Title for this Requirement in the context of System Engineering. Do not include any numbers or Units in the title. Only return the title and no other text."

which is send together with the Requirement text to the AI.

AI Requirement Type Suggestion

This script uses AI to categorize your Requirements into specific types, such as “Functional”, “Performance” or “System“ based on the Requirement Text. All the types defined in your Valispace settings are taken into consideration.

AI_Type_Suggestion.txt

The used custom prompt is:

CODE
custom_prompt = "Respond only with the type. Take into consideration the following types: {types_string}. Based on the requirement text categorize the provided Requirement into one of the provided types ({types_string}). Return only the type in the form of 'type'."

AI Requirements Quality Check

This script checks the quality of your Requirement text against industry INCOSE standards and provides a quantitative and qualitative response in the form of a quality tag and an improvement suggestion.

AI_Quality_Check.txt

The used custom prompt includes the most relevant INCOSE rules:

CODE
custom_prompt = """
        Consider the following INCOSE Standards for writing Requirements:
        R1 - Use a structured, complete sentence: subject, verb, object. 
        R2 - Use the active voice in the main sentence structure of the need or requirement statement with the responsible entity clearly identified as the subject of the sentence. 
        R3 - Ensure the subject and verb of the need or requirement statement are appropriate to the entity to which the need or requirement refers. 
        R5 - Use definite article “the” rather than the indefinite article “a”.
        R6 - Use appropriate units when stating quantities. All numbers should have units of measure explicitly stated.
        R7 - Avoid the use of vague terms such as “some”, “any”, “allowable”, “several”, “many”, “a lot of”, “a few”, “almost always”, “very nearly”, “nearly”, “about”, “close to”, “almost”, and “approximate”. 
        R8 - Avoid escape clauses such as “so far as is possible”, “as little as possible”, “where possible”, “as much as possible”, “if it should prove necessary”, “if necessary”, “to the extent necessary”, “as appropriate”, “as required”, “to the extent practical”, and “if practicable”. 
        R9- Avoid open-ended clauses such as “including but not limited to”, “etc.” and “and so on”. 
        R10 - Avoid superfluous infinitives such as “be designed to”, “be able to”, “be capable of”.  
        R12, 13, 14 - Use correct grammar, spelling, punctuation.
        R15 - Use a defined convention to express logical expressions such as “[X AND Y]”, “[X OR Y]”, [X XOR Y]”, “NOT[X OR Y]”.
        R16 - Avoid the use of “not” 
        R17 - Avoid the use of the oblique ("/") symbol except in units, i.e. km/hr
        R18 - Write a single sentence that contains a single thought conditioned and qualified by relevant sub-clauses.
        R19 - Avoid combinators that join clauses, such as “and”, “or”, ”then”, ”unless”, ”but”, ”as well as”, ”but also”, ”however”, ”whether”, ”meanwhile”, ”whereas”, ”on the other hand”, or ”otherwise”. 
        R20 - Avoid phrases that indicate the purpose of the need or requirement. 
        R21 - Avoid parentheses and brackets containing subordinate text.
        R22 - Enumerate sets explicitly instead of using a group noun to name the set. 
        R24 - Avoid the use of pronouns and indefinite pronouns.
        R26 - Avoid using unachievable absolutes such as 100'%' reliability, 100'%' availability, all, every, always, never, etc.
        R28 - Express the propositional nature of a condition explicitly for a single action instead of giving lists of actions for a specific condition.
        R29 - Classify the needs and requirements according to the aspects of the problem or system it addresses. 
        R31 - When defining design inputs avoid stating a solution unless there is rationale for constraining the design. Focus on the problem “what” rather than the solution “how”. 
        R32 - Use “each” instead of “all”, “any" or “both” when universal quantification is intended. 
        R33 - Define quantities with a range of values appropriate to the entity to which they apply and to which the entity will be verified or validated against.
        R34 - Provide specific measurable performance targets appropriate to the entity to which the need or requirement is stated and against which the entity will be verified to meet.
        R35 - Define temporal dependencies explicitly instead of using indefinite temporal keywords such as “eventually”, “until”, “before”, “after”, “as”, “once”, “earliest”, “latest”, “instantaneous”, “simultaneous”, “at last”.
        R38 - Avoid the use of abbreviations.
        Based on these INCOSE standards for Requirements ONLY return me a dictionary with the quality_score_of_the_requirement_text from 0 to 100 and a corresponding comment_for_improvement in the form of:
        {'Score': quality_score_of_the_requirement_text, 'Comment': comment_for_improvement}.
        """

AI Inconsistency Report in the Analysis Module

This script runs the ValiAssistant “Find Inconsistencies“ feature and outputs a report into the Analysis Module which can then be exported or shared.

AI_Inconsistency_Report.txt

Impact Analysis Report in the Analysis Module

This script performs an analysis on the selected Requirement to check what other Requirements, Components and Test Runs migt be impacted by a change in its text field. The script prepares a report in the Analysis Module which can the be exported or shared.

Basic_Impact_Analysis.txt

This Impact Analysis script does not use any AI but it can be extended to include an AI assessment on the severity of the impact on each one of the related objects.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.