sherlock-review — скилл для Claude Code: расследовать код по фактам
Скилл sherlock-review собирает доказательства и проверяет утверждения об изменениях кода. Помогает найти причину ошибки или подтвердить исправление.
MIT 135 установок ★ 533 обновлён 2026-11-04
npx skills add proffesor-for-testing/agentic-qe --skill sherlock-review -a claude-codeЧто делает sherlock-review
Скилл предлагает пошаговый метод: собрать доказательства (код, тесты, история), сопоставить их с претензией, исключить невозможное, вынести вердикт. Три уровня вердикта (верно, частично верно, неверно) помогают отличить реальное исправление от видимости.
В комплекте шаблон расследования, таблица проверки доказательств и сценарии для типовых случаев: «исправлено ли это ошибку», «правда ли скорость выросла на 50 процентов», «учтены ли все граничные случаи». Скилл интегрируется с агентами qe-code-reviewer, qe-security-auditor, qe-performance-validator; они работают параллельно для проверки разных классов утверждений.
Код и тесты запускаются локально — не полагаясь на сообщения коммитов. Каждое расследование должно выявить минимум три взвешенные находки; результаты сохраняются в памяти агента в пространство имён aqe/sherlock/.
Какие задачи решает
- проверить, исправлена ли ошибка, а не заметена ли под ковёр
- определить, реальное ли улучшение производительности или артефакт измерения
- найти, какие граничные случаи не покрыты тестами
- разобраться, почему баг появился, через анализ изменений и истории
- убедиться, что в коде не скрыто небезопасное поведение
Примеры запросов агенту
- Расследуй PR #42: верно ли, что это исправляет утечку памяти?
- Проверь коммит abc123 по принципу Шерлока — какие доказательства подтверждают или противоречат заявленному ускорению в три раза?
- Собери доказательства для утверждения «обработаны все граничные случаи» и вынеси вердикт
Как установить sherlock-review
1Через Skills CLI (Vercel)
npx skills add proffesor-for-testing/agentic-qe --skill sherlock-review -a claude-code2Вручную: положить файлы
~/.claude/skills/sherlock-review/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/sherlock-review/
1Через Skills CLI (Vercel)
npx skills add proffesor-for-testing/agentic-qe --skill sherlock-review -a codex2Вручную: положить файлы
.agents/skills/sherlock-review/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add proffesor-for-testing/agentic-qe --skill sherlock-review -a cursor2Вручную: положить файлы
.cursor/skills/sherlock-review/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install proffesor-for-testing/agentic-qe assets/skills/sherlock-review2Вручную: положить файлы
.github/skills/sherlock-review/SKILL.md1Через Skills CLI (Vercel)
npx skills add proffesor-for-testing/agentic-qe --skill sherlock-review -a gemini-cli2Командой платформы
gemini skills install https://github.com/proffesor-for-testing/agentic-qe --path assets/skills/sherlock-reviewВручную: положить файлы
.devin/skills/sherlock-review/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add proffesor-for-testing/agentic-qe --skill sherlock-review -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о sherlock-review
Как установить sherlock-review в Claude Code?
Выполни npx skills add proffesor-for-testing/agentic-qe --skill sherlock-review -a claude-code, затем открой ~/.claude/skills/sherlock-review/SKILL.md для справки.
Что делает sherlock-review?
Систематически проверяет утверждения о коде через сбор доказательств, дедукцию и логический анализ. Помогает отличить реальные исправления от видимости и найти корень проблемы.
Какие агенты работают со скиллом?
Скилл координирует qe-code-reviewer для анализа кода, qe-security-auditor для проверки безопасности и qe-performance-validator для измерения производительности. Они работают параллельно.
Исходный текст
SKILL.md · MIT
---
name: sherlock-review
description: "Evidence-based investigative code review using deductive reasoning to determine what actually happened versus what was claimed. Use when verifying implementation claims, investigating bugs, validating fixes, or conducting root cause analysis. Elementary approach to finding truth through systematic observation."
category: quality-review
priority: high
tokenEstimate: 1100
agents: [qe-code-reviewer, qe-security-auditor, qe-performance-validator]
implementation_status: optimized
optimization_version: 1.0
last_optimized: 2025-12-03
dependencies: []
quick_reference_card: true
tags: [investigation, evidence-based, code-review, root-cause, deduction]
trust_tier: 2
validation:
schema_path: schemas/output.json
validator_path: scripts/validate-config.json
eval_path: evals/sherlock-review.yaml
---
# Sherlock Review
<default_to_action>
When investigating code claims:
1. OBSERVE: Gather all evidence (code, tests, history, behavior)
2. DEDUCE: What does evidence actually show vs. what was claimed?
3. ELIMINATE: Rule out what cannot be true
4. CONCLUDE: Does evidence support the claim?
5. DOCUMENT: Findings with proof, not assumptions
**The 3-Step Investigation:**
```bash
# 1. OBSERVE: Gather evidence
git diff <commit>
npm test -- --coverage
# 2. DEDUCE: Compare claim vs reality
# Does code match description?
# Do tests prove the fix/feature?
# 3. CONCLUDE: Verdict with evidence
# SUPPORTED / PARTIALLY SUPPORTED / NOT SUPPORTED
```
**Holmesian Principles:**
- "Data! Data! Data!" - Collect before concluding
- "Eliminate the impossible" - What cannot be true?
- "You see, but do not observe" - Run code, don't just read
- Trust only reproducible evidence
</default_to_action>
## Quick Reference Card
### Evidence Collection Checklist
| Category | What to Check | How |
|----------|---------------|-----|
| **Claim** | PR description, commit messages | Read thoroughly |
| **Code** | Actual file changes | `git diff` |
| **Tests** | Coverage, assertions | Run independently |
| **Behavior** | Runtime output | Execute locally |
| **Timeline** | When things happened | `git log`, `git blame` |
### Verdict Levels
| Verdict | Meaning |
|---------|---------|
| ✓ **TRUE** | Evidence fully supports claim |
| ⚠ **PARTIALLY TRUE** | Claim accurate but incomplete |
| ✗ **FALSE** | Evidence contradicts claim |
| ? **NONSENSICAL** | Claim doesn't apply to context |
| … **UNVERIFIED** | Not enough evidence either way; state what would settle it |
---
## Investigation Template
```markdown
## Sherlock Investigation: [Claim]
### The Claim
"[What PR/commit claims to do]"
### Evidence Examined
- Code changes: [files, lines]
- Tests added: [count, coverage]
- Behavior observed: [what actually happens]
### Deductive Analysis
**Claim**: [specific assertion]
**Evidence**: [what you found]
**Deduction**: [logical conclusion]
**Verdict**: ✓/⚠/✗
### Findings
- What works: [with evidence]
- What doesn't: [with evidence]
- What's missing: [gaps in implementation/testing]
### Recommendations
1. [Action based on findings]
```
## Evidence Over Volume (No Findings Quota)
Every finding and every verdict must chain to observable evidence: code, command output, test results, history. There is no minimum number of observations. When the evidence supports the claim, the correct verdict is TRUE (the output schema's `case-closed-clean`), with a list of what was examined. Manufacturing clues to make an investigation look productive is the same failure Sherlock exists to catch. If the evidence is insufficient either way, say so, state what would settle it, and do not guess.
---
## Investigation Scenarios
### Scenario 1: "This Fixed the Bug"
**Steps:**
1. Reproduce bug on commit before fix
2. Verify bug is gone on commit with fix
3. Check if fix addresses root cause or symptom
4. Test edge cases not in original report
**Red Flags:**
- Fix that just removes error logging
- Works only for specific test case
- Workarounds instead of root cause fix
- No regression test added
### Scenario 2: "Improved Performance by 50%"
**Steps:**
1. Run benchmark on baseline commit
2. Run same benchmark on optimized commit
3. Compare in identical conditions
4. Verify measurement methodology
**Red Flags:**
- Tested only on toy data
- Different comparison conditions
- Trade-offs not mentioned
### Scenario 3: "Handles All Edge Cases"
**Steps:**
1. List all edge cases in code path
2. Check each has test coverage
3. Test boundary conditions
4. Verify error handling paths
**Red Flags:**
- `catch {}` swallowing errors
- Generic error messages
- No logging of critical errors
---
## Example Investigation
```markdown
## Case: PR #123 "Fix race condition in async handler"
### Claims Examined:
1. "Eliminates race condition"
2. "Adds mutex locking"
3. "100% thread safe"
### Evidence:
- File: src/handlers/async-handler.js
- Changes: Added `async/await`, removed callbacks
- Tests: 2 new tests for async flow
- Coverage: 85% (was 75%)
### Analysis:
**Claim 1: "Eliminates race condition"**
Evidence: Added `await` to sequential operations. No actual mutex.
Deduction: Race avoided by removing concurrency, not synchronization.
Verdict: ⚠ PARTIALLY TRUE (solved differently than claimed)
**Claim 2: "Adds mutex locking"**
Evidence: No mutex library, no lock variables, no sync primitives.
Verdict: ✗ FALSE
**Claim 3: "100% thread safe"**
Evidence: JavaScript is single-threaded. No worker threads used.
Verdict: ? NONSENSICAL (meaningless in this context)
### Conclusion:
Fix works but not for reasons claimed. Race condition avoided by
making operations sequential, not by adding synchronization.
### Recommendations:
1. Update PR description to accurately reflect solution
2. Add test for concurrent request handling
3. Remove incorrect technical claims
```
---
## Agent Integration
```typescript
// Evidence-based code review
await Task("Sherlock Review", {
prNumber: 123,
claims: [
"Fixes memory leak",
"Improves performance 30%"
],
verifyReproduction: true,
testEdgeCases: true
}, "qe-code-reviewer");
// Bug fix verification
await Task("Verify Fix", {
bugCommit: 'abc123',
fixCommit: 'def456',
reproductionSteps: steps,
testBoundaryConditions: true
}, "qe-code-reviewer");
```
---
## Agent Coordination Hints
### Memory Namespace
```
aqe/sherlock/
├── investigations/* - Investigation reports
├── evidence/* - Collected evidence
├── verdicts/* - Claim verdicts
└── patterns/* - Common deception patterns
```
### Fleet Coordination
```typescript
const investigationFleet = await FleetManager.coordinate({
strategy: 'evidence-investigation',
agents: [
'qe-code-reviewer', // Code analysis
'qe-security-auditor', // Security claim verification
'qe-performance-validator' // Performance claim verification
],
topology: 'parallel'
});
```
---
## Related Skills
- [brutal-honesty-review](../brutal-honesty-review/) - Direct technical criticism
- [context-driven-testing](../context-driven-testing/) - Adapt to context
- [bug-reporting-excellence](../bug-reporting-excellence/) - Document findings
---
## Remember
**"It is a capital mistake to theorize before one has data."** Trust only reproducible evidence. Don't trust commit messages, documentation, or "works on my machine."
**The Sherlock Standard:** Every claim must be verified empirically. What does the evidence actually show?
© proffesor-for-testing · MIT · proffesor-for-testing/agentic-qe