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-perspectives/code-review-detection.md

View on GitHub
# Code Review Detection Patterns

> **Scope**: Detection commands for common failure modes across languages. Load during any perspective review on a real codebase.
> **Generated**: 2026-04-13

---

## Pattern Catalog

### Handle All Errors (Skeptical Senior, Pedant)

**Detection**:
```bash
rg -n ',\s*_\s*:?=\s*\w+' --type go             # Go: blank identifier discarding errors
rg -n 'except:' --type py                         # Python: bare except
rg -n '\.then\(' --type ts | rg -v '\.catch|async' # JS: promise without catch
```

**Signal**: `result, _ := db.Query(...)` — silent error discard means undetected corruption.

**Preferred action**: Handle error, wrap with `%w` (Go 1.13+), use `errors.Is()`/`errors.As()`.

---

### Use Correct HTTP Status Codes (Pedant)

**Detection**:
```bash
rg -n 'status.*200|StatusOK' --type go | rg -i 'err\|fail\|error'     # 200 on error
rg -n 'InternalServerError|status.*500' --type go | rg -i 'invalid\|bad.request' # 500 for client error
rg -n 'NotFound|status.*404' --type go | rg -i 'auth\|permission'     # 404 for authz
```

Per RFC 7231: 400 invalid input, 404 missing resource, 401 missing auth, 403 insufficient permissions.

---

### Load Credentials from Environment (Skeptical Senior, Pedant)

**Detection**:
```bash
rg -n 'password\s*=\s*"[^"]{4,}"' --type py --type go --type ts -i
rg -n 'api[_-]?key\s*=\s*"[^"]{8,}"' -i
rg -n 'AKIA[0-9A-Z]{16}'                          # AWS key pattern
grep -rn 'postgres://\|mysql://\|mongodb://' --include="*.go" --include="*.ts" --include="*.py" | grep -v '_test\|example'
```

Credentials in git history are permanent. Load from env vars or secrets manager.

---

### Paginate All List Queries (Skeptical Senior)

**Detection**:
```bash
rg -n 'SELECT.*FROM' --type go --type py | rg -v 'LIMIT\|COUNT\|SUM\|MIN\|MAX'
rg -n '\.find\(\|\.all\(\|\.fetch\(' --type py | rg -v 'limit\|paginate\|first\|count'
grep -rn 'findAll\|getAll\|fetchAll' --include="*.ts" --include="*.go"
```

1,000 rows in dev = 50 million in prod. Add LIMIT/OFFSET or cursor pagination.

---

### Use Atomic Operations (Skeptical Senior)

**Detection**:
```bash
grep -rn 'os.path.exists\|path.exists' --include="*.py" | rg -v 'test\|check'  # TOCTOU
rg -n 'await.*get\|await.*find' --type ts -A2 | rg 'await.*set\|await.*update'   # async race
```

**Preferred action**: `sync.Map.LoadOrStore()`, mutex-wrapped check-and-store, or `INSERT ON CONFLICT`.

---

### Batch Related Queries (Skeptical Senior)

**Detection**:
```bash
rg -n 'for.*in.*\.(all|filter|objects)' --type py -A3 | rg '\.(name|id|title|email)\b'
rg -n 'for.*range' --type go -A5 | rg 'db\.Query\|\.Find\|\.Get'
rg -n 'for.*of\|for.*in' --type ts -A3 | rg 'await.*find\|await.*get'
```

100 posts = 101 queries. Use `select_related`, `JOIN`, or batch `IN (...)`.

---

### Enforce Authorization on Every Resource (Skeptical Senior, Pedant)

**Detection**:
```bash
rg -n 'userID|user_id' --type go --type py --type ts -A5 | rg 'db\.\|query\|find' | rg -v 'WHERE.*user_id\|filter.*user_id'
grep -rn 'def get\|def post\|def put' --include="*.py" | rg -v '@login_required\|@permission_required'
rg -n 'router\.(get|post|put|delete)\(' --type ts -B2 | rg -v 'auth\|verify\|require'
```

IDOR: OWASP A01:2021. Always filter by authenticated user's ID.

---

## Error-Fix Mappings

| Error Pattern | Root Cause | Fix |
|---------------|------------|-----|
| `panic: index out of range` | No bounds check | `len(slice) > idx` |
| `context deadline exceeded` | No timeout | `context.WithTimeout()` |
| `429 Too Many Requests` | No backoff | Exponential backoff with jitter |
| `200 OK` with error body | Wrong status | Appropriate 4xx/5xx |
| `UNIQUE constraint failed` | No ON CONFLICT | Upsert or explicit check |

---

## Detection Commands Reference

```bash
rg -n ',\s*_\s*:?=\s*\w+' --type go                          # Ignored errors
rg -n 'StatusOK' --type go | rg -i 'err\|fail'                # HTTP status misuse
rg -n 'password\s*=\s*"[^"]{4,}"' -i                          # Hardcoded secrets
rg -n 'SELECT.*FROM' --type go | rg -v 'LIMIT'                # Missing pagination
grep -rn 'os.path.exists' --include="*.py"                     # TOCTOU race
rg -n 'for.*range' --type go -A5 | rg 'db\.Query'             # N+1
rg -n 'userID' --type go -A5 | rg 'db\.' | rg -v 'WHERE.*user' # Missing authz
```

---

## See Also

- `skeptical-senior.md` — production readiness framework
- `pedant.md` — RFC/spec compliance
- `contrarian.md` — assumption auditing, lock-in detection
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: 472kUpdated 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: 472kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 472kUpdated 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