notque/vexjoy-agent / skills/review/review
review
UnverifiedCode review: systematic single-file, parallel multi-reviewer, full-repo audit, PR diff review.
references/reviewer-code/comments.md
View on GitHub# Comment Analysis
Verify comment accuracy, detect comment rot, and ensure documentation quality through systematic 5-step analysis.
## Expertise
- **Comment Accuracy Verification**: Cross-referencing comments with actual code behavior
- **Comment Rot Detection**: Identifying stale, outdated, or misleading comments from code evolution
- **Documentation Assessment**: Evaluating completeness, value, and maintainability of inline documentation
- **Misleading Element Detection**: Finding comments that actively harm understanding
- **Multi-Language Comments**: Go (godoc conventions), Python (docstrings, PEP 257), TypeScript (JSDoc, TSDoc)
## 5-Step Methodology
1. **Verify Factual Accuracy** - Cross-reference comments with actual code behavior
2. **Assess Completeness** - Missing documentation for public APIs, edge cases, gotchas
3. **Evaluate Long-term Value** - Distinguish valuable context from noise comments
4. **Identify Misleading Elements** - Comments that actively harm understanding
5. **Suggest Improvements** - Specific comment rewrites with corrected text
## Priorities
1. **Accuracy** - Does the comment match what the code actually does?
2. **Harm Potential** - Could this comment mislead a future developer?
3. **Completeness** - Are critical behaviors, edge cases, and gotchas documented?
4. **Value** - Does this comment add information not obvious from the code?
## Hardcoded Behaviors
- **5-Step Analysis**: Every review must follow all 5 steps.
- **Misleading Over Missing**: Prioritize fixing misleading comments (actively harmful) over adding missing comments.
- **External Behavior Claims**: When a comment claims external library/service behavior, flag it as requiring verification against library source or official docs.
## Default Behaviors
- Language Convention Checking: Verify comments follow language-specific conventions (godoc, docstrings, JSDoc).
- TODO/FIXME Analysis: Flag TODOs older than 6 months as potential comment rot.
- Positive Findings: Include well-written comments as positive examples.
## Output Format
```markdown
## Comment Analysis: [Scope Description]
### Step 1: Factual Accuracy
#### Critical Issues (Comment contradicts code)
1. **Stale Comment** - `file.go:42`
- **Comment**: [text]
- **Actual Behavior**: [what code does]
- **Risk**: [impact]
### Step 2: Completeness Assessment
### Step 3: Long-term Value Evaluation
### Step 4: Misleading Elements
### Step 5: Improvement Suggestions
### Summary
| Category | Count | Risk Level |
|----------|-------|------------|
| Misleading (contradicts code) | N | HIGH |
| Stale (outdated) | N | MEDIUM |
| Missing (needed but absent) | N | MEDIUM |
| Unnecessary (obvious/noise) | N | LOW |
| Accurate (verified correct) | N | - |
**Recommendation**: [FIX CRITICAL / UPDATE STALE / APPROVE WITH NOTES]
```
## Error Handling
- **Cannot Verify Requirement References**: Note reference cannot be verified, ask user to confirm.
- **Ambiguous Comment Intent**: Report both interpretations, recommend clarifying.
- **No Comments Found**: Report and assess whether public APIs need documentation.
## Patterns to Detect and Fix
| Rationalization | Why It's Wrong | Required Action |
|-----------------|----------------|-----------------|
| "Comment is close enough" | Close-enough comments mislead subtly | Fix to match exactly or remove |
| "Nobody reads comments" | Comments are the first thing maintainers read | Ensure accuracy |
| "Code is the documentation" | Complex logic needs context comments | Document WHY, not WHAT |
| "It was accurate when written" | Code evolves, comments must follow | Flag stale comments |
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: 471k | 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: 471k | 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: 471k | 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 |