Skip to content

Commit c1a28ca

Browse files
authored
Merge pull request #2 from mohi-devhub/feature/h4-h5-criteria
Refactor Heuristic Evaluation Engine to LLM-Based Analysis
2 parents 6222a92 + c1309a3 commit c1a28ca

File tree

5 files changed

+779
-169
lines changed

5 files changed

+779
-169
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,3 +203,4 @@ ui-debug.log
203203
RUXAILAB/node_modules/
204204
RUXAILAB/dist/
205205
RUXAILAB/.firebase/
206+
ai-heuristics-ruxai-firebase-adminsdk-fbsvc-*.json

app/core/constants.py

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,77 @@ class HeuristicId(Enum):
9090
"severity_weights": {"critical": 10, "major": 6, "minor": 2, "cosmetic": 1}
9191
}
9292
]
93+
},
94+
HeuristicId.H4_CONSISTENCY_AND_STANDARDS: {
95+
"name": "Consistency and Standards",
96+
"description": "Users should not have to wonder whether different words, situations, or actions mean the same thing. Follow platform and industry conventions.",
97+
"measurable_criteria": [
98+
{
99+
"id": "H4.1",
100+
"description": "Consistent button dimensions",
101+
"evaluation": "Buttons of the same type (primary, secondary) should have uniform width/height",
102+
"severity_weights": {"critical": 6, "major": 4, "minor": 2, "cosmetic": 1}
103+
},
104+
{
105+
"id": "H4.2",
106+
"description": "Consistent typography",
107+
"evaluation": "Similar elements (headings, body text, labels) use consistent font sizes and styles",
108+
"severity_weights": {"critical": 6, "major": 4, "minor": 2, "cosmetic": 1}
109+
},
110+
{
111+
"id": "H4.3",
112+
"description": "Consistent color usage",
113+
"evaluation": "Same colors used for same purposes (e.g., primary action buttons same color)",
114+
"severity_weights": {"critical": 8, "major": 5, "minor": 2, "cosmetic": 1}
115+
},
116+
{
117+
"id": "H4.4",
118+
"description": "Consistent terminology",
119+
"evaluation": "Same terms used for same actions across the interface (not mix of Save/Submit, Delete/Remove)",
120+
"severity_weights": {"critical": 8, "major": 5, "minor": 3, "cosmetic": 1}
121+
},
122+
{
123+
"id": "H4.5",
124+
"description": "Platform conventions followed",
125+
"evaluation": "UI follows established platform patterns (navigation placement, icon usage)",
126+
"severity_weights": {"critical": 10, "major": 6, "minor": 3, "cosmetic": 1}
127+
}
128+
]
129+
},
130+
HeuristicId.H5_ERROR_PREVENTION: {
131+
"name": "Error Prevention",
132+
"description": "Even better than good error messages is a careful design which prevents a problem from occurring in the first place.",
133+
"measurable_criteria": [
134+
{
135+
"id": "H5.1",
136+
"description": "Input validation before submission",
137+
"evaluation": "Form fields validate input format before allowing submission (email, phone, required fields)",
138+
"severity_weights": {"critical": 10, "major": 6, "minor": 3, "cosmetic": 1}
139+
},
140+
{
141+
"id": "H5.2",
142+
"description": "Constraints on input fields",
143+
"evaluation": "Input fields have appropriate constraints (max length, input type, allowed characters)",
144+
"severity_weights": {"critical": 8, "major": 5, "minor": 2, "cosmetic": 1}
145+
},
146+
{
147+
"id": "H5.3",
148+
"description": "Confirmation for high-risk actions",
149+
"evaluation": "Irreversible or significant actions require explicit confirmation",
150+
"severity_weights": {"critical": 10, "major": 7, "minor": 3, "cosmetic": 1}
151+
},
152+
{
153+
"id": "H5.4",
154+
"description": "Default values and suggestions",
155+
"evaluation": "Fields provide sensible defaults or suggestions to reduce user errors",
156+
"severity_weights": {"critical": 4, "major": 3, "minor": 2, "cosmetic": 1}
157+
},
158+
{
159+
"id": "H5.5",
160+
"description": "Disable invalid options",
161+
"evaluation": "Options that are not available are disabled rather than hidden, preventing confusion",
162+
"severity_weights": {"critical": 6, "major": 4, "minor": 2, "cosmetic": 1}
163+
}
164+
]
93165
}
94166
}

0 commit comments

Comments
 (0)