Skip to content

Add New Rule - MissingMetadataDescription (for Elements & Variables) #215

@tomkittlabs

Description

@tomkittlabs

I'd like to suggest a new rule focused on improving the maintainability and documenting of Flows by encouraging the use of descriptions on various metadata components.

Current Behaviour:
The scanner currently checks for a description at the top level of the Flow via the FlowDescription rule. However, it does not check if individual elements (like Get Records, Assignments, Decisions) or other metadata items (like Variables, Formulas, Constants, Text Templates) have descriptions populated.

Proposed Enhancement:
I propose adding a new rule, potentially named MissingMetadataDescription:

Description:
Detects Flow elements (e.g., recordLookups, assignments, decisions, screens, actionCalls, etc.) AND other metadata components (e.g., variables, formulas, constants, textTemplates) that are missing a value in their description property.

Expected Behaviour:
The scanner flags elements or variables/formulas lacking a description with a 'note' severity.

Justification: Adding descriptions to elements and variables is a crucial best practice for documentation and maintainability, similar to code comments. It helps others understand the purpose of each component. Furthermore, in the age of AI tools analysing metadata, having this context embedded becomes even more valuable for accurate interpretation and generation.

Implementation Notes: The rule would need to iterate through flow.elements and check the description property of each. It would also need to iterate through flow.variables, flow.formulas, flow.constants, flow.textTemplates (and potentially others) checking their respective description properties.

Why This Would Be Useful:

This rule promotes Flow maintainability, readability, and documentation. Encouraging descriptions makes Flows significantly easier to understand, debug and modify over time, especially in team environments or when revisiting older automation. It also enhances the value when AI is analysing metadata

Documentation:
Documentation in AI World -

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomersnew ruleA new suggestion for a best practice to be included in the scanner

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions