Notes_RuleNaming - rpapub/WatchfulAnvil GitHub Wiki
When designing custom static analyzer rules in UiPath, clear naming isn't just a cosmetic choice — it's part of the developer experience. Inspired by the metaphor of a master craftsman guiding an apprentice, I’ve adopted a structured and expressive naming convention that blends engineering clarity with poetic discipline.
Each rule name answers three questions:
-
What is the master doing? — e.g.,
Judge
,Inspect
,Refine
-
What is being examined? — e.g.,
Flow
,Structure
,Path
-
What aspect is under scrutiny? — e.g.,
Form
,Discipline
,Stability
The result is a class name like:
public class RefineFlowDisciplineRule : IRegisterAnalyzerConfiguration
This rule might check that control flow in a unit-of-work is clean, shallow, and focused — not cluttered or directionless.
Each rule class is mapped to a structured ID:
-
CPRIMA
= namespace prefix -
ABC
= abbreviation of the three name parts (RefineFlowDiscipline
→RFD
) -
###
= sequence number
So our example becomes:
private const string RuleId = "CPRIMA-RFD-001";
This keeps RuleIDs short and sortable, while the class name remains human-readable and expressive.
- Encourages thoughtful naming rooted in metaphor and purpose
- Scales easily as the rule set grows
- Reflects a mindset of mentorship and discipline — the master guiding the apprentice
- Leaves space for both strict enforcement and stylistic guidance
This approach turns your static analyzer into a tool of craft — less a judge, more a mentor, helping your automations grow into clean, reliable systems.
Goal: Help the user design a new static analyzer rule in UiPath Studio using the Master–Apprentice metaphor.
Steps:
-
Start with Context Collection Ask the user:
- What is the rule checking or validating? (e.g. input arguments, selector stability)
- Why is it important? (e.g. for modularity, clarity, robustness)
- What is the tone they want? (strict, advisory, reflective, playful)
- Is it more about structure, behavior, naming, or logic?
-
Map Metaphor From the answers, choose:
- A Master Verb:
Judge
,Test
,Review
,Inspect
,Refine
,Challenge
,Observe
- A Target Trait:
Flow
,Path
,Structure
,Naming
,Craft
,Discipline
,Motion
- A Subject Noun:
Form
,Stability
,Isolation
,Intent
,Weight
,Boundaries
,Drift
- A Master Verb:
-
Generate Rule Class Name
- Format:
<Verb><Trait><Subject>Rule
Example:RefineFlowDisciplineRule
- Format:
-
Generate RuleID
- Prefix:
CPRIMA-
- Abbreviation: Take the first letters of each of the three parts
Example:
RFD
→CPRIMA-RFD-001
- Prefix:
-
Confirm with User
- Present the generated class name and RuleID
- Offer a one-line description of what it does
- Ask if they’d like to revise any part
Output Format:
// Class name
public class RefineFlowDisciplineRule : IRegisterAnalyzerConfiguration
{
private const string RuleId = "CPRIMA-RFD-001";
...
}
Example Prompt for LLM Usage:
"Let’s design a new static analyzer rule. What does your rule check for, and why? Is it strict or more advisory? Would you describe it as focused on structure, behavior, naming, or something else?"