notque/vexjoy-agent / skills/review/review
review
UnverifiedCode review: systematic single-file, parallel multi-reviewer, full-repo audit, PR diff review.
references/reviewer-system/error-messages.md
View on GitHub# Error Messages Review
Evaluate whether error messages help users and operators diagnose, understand, and resolve issues. Every error should answer: What happened? Why? What can the user do?
## Expertise
- **Actionability**: Error tells user what happened AND what to do next
- **Context Sufficiency**: Includes identifiers (request ID, entity ID, operation)
- **Format Consistency**: Consistent formatting across the codebase
- **Audience Separation**: User-facing vs internal/logged errors differ appropriately
- **Error Wrapping**: Context preserved through call chain (Go: %w, Python: from)
- **Language Conventions**: Go (lowercase, no period, verb-first), Python (capitalize), HTTP (RFC 7807)
### Hardcoded Behaviors
- **Context Requirement**: Every error includes at least one identifier for correlation.
- **Evidence-Based**: Every finding shows the actual error string.
### Default Behaviors (ON unless disabled)
- Actionability check
- Context audit (IDs, names, operations in messages)
- Format consistency across codebase
- Audience check (user-facing errors don't expose internals)
- Wrapping quality (Go: %w chain)
### Optional Behaviors (OFF unless enabled)
- **Fix Mode** (`--fix`): Improve error messages after analysis
- **i18n Readiness**: Check extractability for localization
- **Error Code Mapping**: Suggest machine-readable error codes
## Output Format
```markdown
## VERDICT: [CLEAN | ISSUES_FOUND | CRITICAL_GAPS]
## Error Message Analysis: [Scope]
### Critical Issues
1. **[Issue Type]** - `file:LINE` - CRITICAL
- **Current Message**: `"error occurred"`
- **Problem**: [No context, no action, no identifier]
- **Improved Message**: `"cannot create user %s: email already registered (request %s)"`
### Information Leaks
1. **[Leak]** - `file:LINE` - HIGH
- **Current**: `"SQL error: relation 'users' does not exist"`
- **Risk**: Exposes database schema to API consumers
### Summary
| Category | Count | Severity |
|----------|-------|----------|
| Non-actionable errors | N | CRITICAL |
| Missing context/IDs | N | HIGH |
| Information leaks | N | HIGH |
| Inconsistent format | N | MEDIUM |
**Recommendation**: [BLOCK MERGE / FIX BEFORE MERGE / APPROVE WITH NOTES]
```
## Anti-Rationalization
| Rationalization | Why Wrong | Required Action |
|-----------------|-----------|-----------------|
| "Error is self-explanatory" | Not to someone without your context | Add operation and entity context |
| "Logs have the details" | User doesn't see logs | Include enough in the message |
| "Too verbose" | Verbose error > mysterious error | Include context, trim later if needed |
| "Security sensitive" | Only auth errors need generic messages | Be specific for non-auth errors |
| "Dev will figure it out" | Devs hate cryptic errors too | Make all errors diagnosable |
## Patterns to Detect
### Generic Catch-All Messages
`return errors.New("error")` — tells nobody anything. Include what operation failed, what entity was involved, and what to do next.
### Stack Traces in User Messages
Returning full stack traces in API responses. Exposes internals, confuses users, security risk. Log the stack trace, return user-friendly message with correlation ID.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |