qe-defect-intelligence — скилл для Claude Code: предсказание дефектов
Скилл qe-defect-intelligence анализирует код на вероятность ошибок по частоте изменений, сложности и истории багов. Помогает найти проблемные участки до того, как они попадут в продакшн.
MIT 129 установок ★ 533 обновлён 2026-10-25
npx skills add proffesor-for-testing/agentic-qe --skill qe-defect-intelligence -a claude-codeЧто делает qe-defect-intelligence
Скилл использует три подхода: предсказывает риск дефектов в изменённом коде на основе метрик сложности и опыта авторов, ищет повторяющиеся паттерны в истории тестовых падений и выполняет анализ корневых причин через методы «5 почему» и диаграмму Исикавы.
Модель учитывает вес каждого фактора — частоту изменений кода, его сложность, покрытие тестами, опыт разработчика с модулем и историю дефектов в файле. Можно синхронизировать с Jira: скилл создаст задачи для высокорисковых изменений и предложит ответственного.
Для работы нужен доступ к истории коммитов, результатам тестов и системе отслеживания дефектов. Координирует с агентами qe-defect-predictor, qe-pattern-learner и qe-root-cause-analyzer.
Какие задачи решает
- предсказать, какой код станет источником багов в спринте
- найти корневую причину в цепочке падающих тестов
- выявить паттерны — какие ошибки повторяются месяцами
- приоритизировать ревью по реальному риску, а не по размеру PR
Примеры запросов агенту
- Проанализируй PR #456 на риск дефектов и посчитай вероятность ошибок по изменениям
- Найди корневую причину повторяющегося падения тестов в AuthService за последние 30 дней
- Выучи паттерны из истории резолвленных багов в Jira и предскажи, где они случатся снова
Как установить qe-defect-intelligence
1Через Skills CLI (Vercel)
npx skills add proffesor-for-testing/agentic-qe --skill qe-defect-intelligence -a claude-code2Вручную: положить файлы
~/.claude/skills/qe-defect-intelligence/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/qe-defect-intelligence/
1Через Skills CLI (Vercel)
npx skills add proffesor-for-testing/agentic-qe --skill qe-defect-intelligence -a codex2Вручную: положить файлы
.agents/skills/qe-defect-intelligence/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add proffesor-for-testing/agentic-qe --skill qe-defect-intelligence -a cursor2Вручную: положить файлы
.cursor/skills/qe-defect-intelligence/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install proffesor-for-testing/agentic-qe assets/skills/qe-defect-intelligence2Вручную: положить файлы
.github/skills/qe-defect-intelligence/SKILL.md1Через Skills CLI (Vercel)
npx skills add proffesor-for-testing/agentic-qe --skill qe-defect-intelligence -a gemini-cli2Командой платформы
gemini skills install https://github.com/proffesor-for-testing/agentic-qe --path assets/skills/qe-defect-intelligenceВручную: положить файлы
.devin/skills/qe-defect-intelligence/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add proffesor-for-testing/agentic-qe --skill qe-defect-intelligence -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о qe-defect-intelligence
Как установить qe-defect-intelligence в Claude Code?
Выполни npx skills add proffesor-for-testing/agentic-qe --skill qe-defect-intelligence -a claude-code. Скилл появится в ~/.claude/skills/qe-defect-intelligence/SKILL.md.
Что делает qe-defect-intelligence?
Предсказывает вероятность дефектов в коде по метрикам сложности и истории, анализирует паттерны падений тестов и находит корневые причины ошибок через структурированные методы анализа.
Какие данные нужны скиллу для работы?
История коммитов (от 5 коммитов назад), результаты тестов и доступ к системе отслеживания дефектов вроде Jira. Без них модель не сможет обучиться на паттернах.
Исходный текст
SKILL.md · MIT
---
name: "qe-defect-intelligence"
description: "Predicts defect-prone code using change frequency, complexity metrics, and historical bug patterns. Use when predicting defects before they escape, analyzing root causes of test failures, learning from past defect patterns, or implementing proactive quality management."
trust_tier: 3
validation:
schema_path: schemas/output.json
validator_path: scripts/validate-config.json
eval_path: evals/qe-defect-intelligence.yaml
---
# QE Defect Intelligence
## Purpose
Guide the use of v3's defect intelligence capabilities including ML-based defect prediction, pattern recognition from historical data, and automated root cause analysis.
## Activation
- When predicting defect-prone code
- When analyzing failure patterns
- When performing root cause analysis
- When learning from past defects
- When prioritizing testing based on risk
## Quick Start
```bash
# Predict defects in changed code
aqe defect predict --changes HEAD~5..HEAD
# Analyze failure patterns
aqe defect patterns --period 90d --min-occurrences 3
# Root cause analysis
aqe defect rca --failure "test/auth.test.ts:45"
# Learn from resolved defects
aqe defect learn --source jira --status resolved
```
## Agent Workflow
```typescript
// Defect prediction
Task("Predict defect-prone code", `
Analyze PR #456 changes and predict defect likelihood:
- Historical defect correlation
- Code complexity factors
- Author experience with module
- Test coverage gaps
Flag high-risk changes requiring extra review.
`, "qe-defect-predictor")
// Root cause analysis
Task("Analyze test failure", `
Investigate recurring failure in AuthService tests:
- Collect failure history (last 30 days)
- Identify common patterns
- Trace to potential root causes
- Suggest fixes using 5-whys analysis
`, "qe-root-cause-analyzer")
```
## Prediction Models
### 1. Change-Based Prediction
```typescript
await defectPredictor.predictFromChanges({
changes: prChanges,
factors: {
codeChurn: { weight: 0.2 },
complexity: { weight: 0.25 },
authorExperience: { weight: 0.15 },
fileHistory: { weight: 0.2 },
testCoverage: { weight: 0.2 }
},
threshold: {
high: 0.7,
medium: 0.4,
low: 0.2
}
});
```
### 2. Pattern Learning
```typescript
await patternLearner.learnPatterns({
source: {
defects: 'jira:project=MYAPP&type=bug',
commits: 'git:last-6-months',
tests: 'test-results:last-1000-runs'
},
patterns: [
'code-smell-to-defect',
'change-coupling',
'test-gap-correlation',
'complexity-defect-density'
],
output: {
rules: true,
visualizations: true,
recommendations: true
}
});
```
### 3. Root Cause Analysis
```typescript
await rootCauseAnalyzer.analyze({
failure: testFailure,
methods: [
'five-whys',
'fishbone-diagram',
'fault-tree',
'change-impact'
],
context: {
recentChanges: true,
environmentDiff: true,
dependencyChanges: true,
similarFailures: true
}
});
```
## Defect Prediction Report
```typescript
interface DefectPrediction {
file: string;
riskScore: number; // 0-1
riskLevel: 'critical' | 'high' | 'medium' | 'low';
factors: {
name: string;
contribution: number;
details: string;
}[];
historicalDefects: {
count: number;
recent: Defect[];
patterns: string[];
};
recommendations: {
action: string;
priority: string;
expectedRiskReduction: number;
}[];
}
```
## Pattern Categories
| Pattern | Detection | Prevention |
|---------|-----------|------------|
| Null pointer | Static analysis | Null checks, Optional |
| Race condition | Concurrency analysis | Locks, atomic ops |
| Memory leak | Heap analysis | Resource cleanup |
| Off-by-one | Boundary analysis | Loop invariants |
| Injection | Taint analysis | Input validation |
## Root Cause Templates
```yaml
root_cause_analysis:
five_whys:
max_depth: 5
prompt_template: "Why did {effect} happen?"
fishbone:
categories:
- people
- process
- tools
- environment
- materials
- measurement
fault_tree:
top_event: "Test Failure"
gate_types: [AND, OR, NOT]
basic_events: true
```
## Integration with Issue Tracking
```typescript
await defectIntelligence.syncWithTracker({
source: 'jira',
project: 'MYAPP',
sync: {
defectData: 'bidirectional',
predictions: 'create-tasks',
patterns: 'update-labels'
},
automation: {
flagHighRisk: true,
suggestAssignee: true,
linkRelated: true
}
});
```
## Coordination
**Primary Agents**: qe-defect-predictor, qe-pattern-learner, qe-root-cause-analyzer
**Coordinator**: qe-defect-intelligence-coordinator
**Related Skills**: qe-coverage-analysis, qe-quality-assessment
© proffesor-for-testing · MIT · proffesor-for-testing/agentic-qe