Skip to content

notque/vexjoy-agent / skills/review/review

Code review: systematic single-file, parallel multi-reviewer, full-repo audit, PR diff review.

FileKindSize
SKILL.mdskill md11.7 KB
references/architecture-smell-baseline.mdmarkdown6.8 KB
references/audit-playbook.mdmarkdown10.2 KB
references/disprove-pass.mdmarkdown2.3 KB
references/go-review-patterns.mdmarkdown4.0 KB
references/receiving-feedback.mdmarkdown3.0 KB
references/report-template.mdmarkdown1.9 KB
references/reviewer-code.mdmarkdown6.2 KB
references/reviewer-code/code-quality.mdmarkdown4.6 KB
references/reviewer-code/comments.mdmarkdown3.6 KB
references/reviewer-code/config-safety.mdmarkdown3.7 KB
references/reviewer-code/dead-code.mdmarkdown3.2 KB
references/reviewer-code/language-checks.mdmarkdown6.7 KB
references/reviewer-code/language-specialist.mdmarkdown4.7 KB
references/reviewer-code/naming.mdmarkdown3.3 KB
references/reviewer-code/performance.mdmarkdown3.5 KB
references/reviewer-code/simplifier.mdmarkdown5.3 KB
references/reviewer-code/test-analyzer.mdmarkdown4.5 KB
references/reviewer-code/type-design.mdmarkdown4.0 KB
references/reviewer-domain.mdmarkdown9.1 KB
references/reviewer-domain/adr-compliance.mdmarkdown3.0 KB
references/reviewer-domain/business-logic.mdmarkdown4.6 KB
references/reviewer-domain/common-bugs.mdmarkdown6.7 KB
references/reviewer-domain/edge-case-tables.mdmarkdown4.5 KB
references/reviewer-domain/operational-preferred-patterns.mdmarkdown7.2 KB
references/reviewer-domain/pragmatic-builder.mdmarkdown4.2 KB
references/reviewer-domain/production-gaps.mdmarkdown5.3 KB
references/reviewer-domain/sapcc-structural.mdmarkdown5.4 KB
references/reviewer-domain/state-machine-verification.mdmarkdown5.2 KB
references/reviewer-domain/structural-categories.mdmarkdown5.8 KB
references/reviewer-perspectives.mdmarkdown8.0 KB
references/reviewer-perspectives/clarity-and-assumption-detection.mdmarkdown4.8 KB
references/reviewer-perspectives/code-review-detection.mdmarkdown4.4 KB
references/reviewer-perspectives/contrarian.mdmarkdown2.3 KB
references/reviewer-perspectives/meta-process.mdmarkdown2.7 KB
references/reviewer-perspectives/newcomer.mdmarkdown2.0 KB
references/reviewer-perspectives/pedant.mdmarkdown3.3 KB
references/reviewer-perspectives/review-detection-commands.mdmarkdown8.7 KB
references/reviewer-perspectives/skeptical-senior.mdmarkdown2.9 KB
references/reviewer-perspectives/user-advocate.mdmarkdown2.9 KB
references/reviewer-system.mdmarkdown14.0 KB
references/reviewer-system/api-contract.mdmarkdown3.4 KB
references/reviewer-system/compliance-checklists.mdmarkdown5.1 KB
references/reviewer-system/concurrency.mdmarkdown3.6 KB
references/reviewer-system/dependency-audit.mdmarkdown3.3 KB
references/reviewer-system/docs-validator.mdmarkdown4.0 KB
references/reviewer-system/error-messages.mdmarkdown3.1 KB
references/reviewer-system/financial-resilience-de-eu.mdmarkdown5.3 KB
references/reviewer-system/german-it-security.mdmarkdown10.7 KB
references/reviewer-system/industry-specific-compliance.mdmarkdown3.5 KB
references/reviewer-system/migration-safety.mdmarkdown3.3 KB
references/reviewer-system/observability.mdmarkdown3.1 KB
references/reviewer-system/security-authz.mdmarkdown9.0 KB
references/reviewer-system/security-ci-cd.mdmarkdown7.6 KB
references/reviewer-system/security-data-exfil.mdmarkdown9.5 KB
references/reviewer-system/security-finding-template.mdmarkdown3.0 KB
references/reviewer-system/security-injection.mdmarkdown6.3 KB
references/reviewer-system/security-pii.mdmarkdown7.3 KB
references/reviewer-system/security.mdmarkdown3.6 KB
references/reviewer-system/silent-failures.mdmarkdown3.6 KB
references/reviewer-system/sovereign-cloud-data-residency.mdmarkdown6.6 KB
references/reviewer-system/stride-threat-model.mdmarkdown3.2 KB

references/reviewer-code/simplifier.md

View on GitHub
# Code Simplification

Reduce complexity and improve code clarity while preserving exact functionality. Unlike read-only reviewers, this dimension actively modifies code as simplification is inherently a modification task.

## Expertise

- **Complexity Reduction**: Cyclomatic complexity, nesting depth, cognitive load analysis
- **Clarity Patterns**: Explicit control flow, clear naming, readable structure
- **Refactoring Techniques**: Extract function, flatten conditionals, simplify expressions, guard clauses
- **Language Idioms**: Go, Python, TypeScript, JavaScript idiomatic simplification
- **Behavior Preservation**: Ensuring refactored code produces identical results

## Methodology

- Clarity over brevity: readable code beats clever code
- No nested ternaries: use explicit if/else
- Guard clauses over deep nesting
- Early returns to reduce indentation
- CLAUDE.md standards as simplification guide
- One simplification at a time with verification

## Priorities

1. **Preserve Behavior** - Exact same functionality after simplification
2. **Reduce Cognitive Load** - Lower nesting, clearer flow, better names
3. **Follow Conventions** - CLAUDE.md and language idioms guide structure
4. **Verify** - Run tests after each simplification to confirm correctness

## Hardcoded Behaviors

- **Behavior Preservation**: Every simplification must preserve exact functionality. No behavioral changes allowed.
- **Test Verification**: Run existing tests after simplification. If tests fail, revert the change.
- **Default Scope**: When no files are specified, simplify recently modified code (files in `git diff --name-only`).
- **No Nested Ternaries**: Replace all nested ternary expressions with explicit if/else.
- **Explicit Over Implicit**: Prefer explicit control flow over clever constructs.
- **One Change at a Time**: Apply simplifications incrementally, verifying each before proceeding.

## Default Behaviors

- Show before/after code comparisons
- Guard Clauses: Convert deep nesting to early returns
- Extract Functions: Extract complex inline logic into named functions when it improves readability
- Flatten Conditionals: Reduce nesting depth by inverting conditions and returning early
- Naming Improvements: Suggest better variable/function names when current names obscure intent
- Remove Dead Code: Remove unreachable code, unused variables, commented-out code blocks

## Output Format

```markdown
## Code Simplification: [Scope Description]

### Scope
- **Source**: [git diff / specific files]
- **Files Analyzed**: [count]

### Simplifications Applied

#### 1. [Simplification Name] - `file.go:42-58`

**Before**: [code]
**After**: [code]
**Why**: [Explanation of clarity improvement]
**Complexity Change**: [metric]

### Summary

| Metric | Before | After |
|--------|--------|-------|
| Files Modified | - | N |
| Simplifications Applied | - | N |
| Max Nesting Depth | N | M |

### Verification
- **Tests Run**: [yes/no]
- **Tests Passed**: [yes/no]
- **Behavior Changed**: NO (verified)
```

## Error Handling

- **Tests Fail After Simplification**: Immediately revert. Report the simplification caused test failure.
- **Complex Code Is Complex for a Reason**: Report complexity but note business rules resist simplification.
- **No Recent Changes**: Ask user which files to simplify.

## Patterns to Detect and Fix

| Rationalization | Why It's Wrong | Required Action |
|-----------------|----------------|-----------------|
| "Shorter is simpler" | Brevity != clarity | Optimize for readability |
| "Tests still pass" | Tests may not cover changed behavior | Verify test coverage of modified paths |
| "It's just a refactor" | Refactors can change behavior | Run tests after every change |
| "The original was bad" | Bad doesn't justify risky changes | Incremental improvement with verification |

## Blocker Criteria

- No tests exist for target code
- Complex business logic encoding
- Multiple valid simplification approaches (pick one, record why in the finding, and ask Jev only when genuinely unsure)
- Simplification changes public API

## Abstraction Boundary Patterns

Patterns where unnecessary complexity can be removed while preserving behavior. See `skills/programming/programming/references/go/preferred-patterns/code-examples.md` AP-8 for full before/after examples.

### Detection Signals

| Signal | Grep / Structural Check | Simplification |
|--------|------------------------|----------------|
| Defensive copy on fresh slice | `make([]T, len(x)+N)` + `copy(result, x)` where x is freshly allocated | Replace with `append(x, element)` |
| Coupling comment | `grep -rn "must be called after\|must always follow\|INVARIANT.*call" --include="*.go"` | Merge the "always follows" logic into the prerequisite function |
| Same-pair call pattern | `helperB(result)` appears after every `result := functionA()` call site | Move `helperB` logic inside `functionA` |

### Coupling Comment Fix

When a comment says "must be called after X", the fix is to move that logic inside X. The comment documents a coupling that code structure should eliminate.

```go
// Before: Comment documents what code should enforce
labelKey, vals := scopeToLabel(req, ks)
vals = appendSentinel(vals) // forget this = silent bug

// After: Coupling eliminated — impossible to forget
labelKey, vals := scopeToLabel(req, ks) // sentinel included automatically
```

**Origin**: PR #220 — Stefan Majewsky.
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: 471kUpdated Claude CodeCodexVerifiedInstall
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: 471kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall