mcpField
Q
qe-sherlock-review

qe-sherlock-review

github.com/proffesor-for-testingテスト・品質51984 回インストール今日更新
リポジトリ

qe-sherlock-review について

qe-sherlock-reviewは、再現可能な証拠に基づいてコード上の主張を調べるスキルです。証拠の収集、コードや実際の挙動との照合、判定の記録を支援します。

主な機能

  1. 01コード、テスト、履歴、実行結果の証拠収集
  2. 02主張と観察した証拠の照合
  3. 034段階の判定分類
  4. 04調査テンプレートとシナリオ別チェックリスト

活用シーン

  1. 01プルリクエストが報告済みの不具合を直すか評価
  2. 02ベンチマークによる性能向上の主張の確認
  3. 03境界ケースの網羅性と回帰テストの確認

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/proffesor-for-testing/agentic-qe --skill qe-sherlock-review

インストール後、Claude Code で/qe-sherlock-reviewを入力して読み込まれたか確認します。

詳細

Sherlock レビュー

<default_to_action> コードに関する主張を調査する場合:

  1. 観察:すべての証拠(コード、テスト、履歴、動作)を集めます
  2. 推論:証拠が実際に示していることと、主張されたことを区別します
  3. 排除:真実ではあり得ないことを除外します
  4. 結論:証拠が主張を裏付けているか判断します
  5. 記録:推測ではなく、証拠を伴う調査結果を記録します

3ステップ調査:

# 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

ホームズ流の原則:

  • 「データだ! データだ! データだ!」—結論を出す前に集めます
  • 「不可能なものを排除せよ」—真実ではあり得ないことは何ですか?
  • 「見てはいても、観察してはいない」—読むだけでなく、コードを実行します
  • 再現可能な証拠だけを信頼します </default_to_action>

クイックリファレンスカード

証拠収集チェックリスト
カテゴリ確認する内容方法
主張PR の説明、コミットメッセージ入念に読みます
コード実際のファイル変更git diff
テストカバレッジ、アサーション個別に実行します
動作実行時の出力ローカルで実行します
タイムライン事象の発生時期git log、git blame
判定レベル
判定意味
✓ TRUE証拠が主張を完全に裏付けています
⚠ PARTIALLY TRUE主張は正確ですが、不完全です
✗ FALSE証拠が主張と矛盾しています
? NONSENSICAL主張はこの文脈には当てはまりません

調査テンプレート

## 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]

調査シナリオ

シナリオ 1:「これでバグを修正しました」

手順:

  1. 修正前のコミットでバグを再現します
  2. 修正を含むコミットでバグが解消していることを確認します
  3. 修正が根本原因に対処しているのか、症状に対処しているのか確認します
  4. 元の報告に含まれていないエッジケースをテストします

危険信号:

  • エラーログを削除するだけの修正
  • 特定のテストケースでしか動作しない
  • 根本原因を修正せず、回避策で済ませている
  • 回帰テストが追加されていない
シナリオ 2:「パフォーマンスが 50% 向上しました」

手順:

  1. ベースラインのコミットでベンチマークを実行します
  2. 最適化されたコミットで同じベンチマークを実行します
  3. 同一条件で比較します
  4. 測定方法を検証します

危険信号:

  • おもちゃのようなデータでしかテストしていない
  • 比較条件が異なる
  • トレードオフに触れていない
シナリオ 3:「すべてのエッジケースに対応します」

手順:

  1. コードパスにあるすべてのエッジケースを列挙します
  2. 各ケースにテストカバレッジがあることを確認します
  3. 境界条件をテストします
  4. エラー処理の経路を検証します

危険信号:

  • catch {} でエラーを握りつぶしている
  • 汎用的なエラーメッセージ
  • 重大なエラーのログがない

調査例

## 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

エージェントの統合

// 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");

エージェント連携のヒント

メモリの名前空間
aqe/sherlock/
├── investigations/*   - Investigation reports
├── evidence/*         - Collected evidence
├── verdicts/*         - Claim verdicts
└── patterns/*         - Common deception patterns
フリート連携
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'
});

関連スキル


忘れないでください

「データがないうちに理論を立てるのは、重大な過ちです。」 再現可能な証拠だけを信頼してください。コミットメッセージ、ドキュメント、「自分のマシンでは動く」を信頼してはいけません。

シャーロック基準: すべての主張を実証的に検証する必要があります。証拠が実際に示しているのは何でしょうか?

コメント