← 返回 Skills 市场
borodich

Bug Fix Protocol

作者 borodich · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
127
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install bug-fix-protocol
功能描述
Structured protocol for fixing bugs with AI agents. Prevents hallucinations and fix loops by enforcing step-by-step diagnosis before code changes.
使用说明 (SKILL.md)

BUG-FIX-PROTOCOL Skill

Source: https://github.com/CodeAlive-AI/ai-driven-development/blob/main/BUG-FIX-PROTOCOL.md
Concept by Rodion Mostovoy

Core Philosophy

Тест-система = страховочная сетка (safety net)

  • Баг на проде = баг тест-системы в первую очередь
  • Каждый баг-фикс = два фикса: код + патч тест-системы
  • "Тесты" — это не только unit-тесты. Это всё:
    • Unit / Integration / E2E тесты
    • PRD assessment (соответствие продукт-требованиям)
    • Review спеки и документации
    • Code review
    • Статический анализ (linters, type checkers)
    • Визуальные тесты

⚠️ ГЛАВНОЕ ПРАВИЛО

НИКОГДА не фиксить баг без воспроизведения через тест.

Если воспроизвести через тест невозможно — скажи явно с обоснованием. Но не фикси молча.


8-Шаговый Протокол (Чеклист)

[ ] Шаг 1 — Понять баг

  • Разберись, что именно сломалось
  • Придумай способ воспроизведения
  • Непонятно → спроси, не гадай
  • Не трогай код, пока не понял проблему

[ ] Шаг 2 — Воспроизвести через тест

  • Напиши тест, который падает на баге
  • Тест должен быть красным ДО фикса
  • Если воспроизвести через тест невозможно — скажи явно с обоснованием
  • Не переходи к шагу 3 без красного теста (или явного объяснения почему нельзя)

[ ] Шаг 3 — Найти корневую причину

  • Ищи корень, не симптом
  • Задай себе "почему?" минимум 3 раза
  • Не фиксируй то, что видишь — найди то, что это вызвало

[ ] Шаг 4 — Спроектировать правильный фикс

  • Придумай грамотный фикс, не костыль
  • Оцени scope изменений
  • Большой рефакторинг → остановись, спроси перед началом
  • Фикс должен решать корень, не симптом

[ ] Шаг 5 — Применить минимальные правки

  • Чини с минимальными изменениями
  • Не затрагивай части кода, не связанные с багом
  • Каждое изменение должно быть обосновано

[ ] Шаг 6 — Проверить тесты

  • Запусти тест из шага 2 → должен быть зелёным
  • Запусти соседние/связанные тесты → не сломались?
  • Запусти полный test suite если возможно
  • Только зелёный suite → идём дальше

[ ] Шаг 7 — Deep Review: похожие проблемы

  • Раз тест-система не поймала этот баг — похожие проблемы могут быть везде
  • Проведи поиск аналогичных паттернов в кодовой базе
  • Проверь похожие модули/компоненты
  • Задокументируй находки

[ ] Шаг 8 — Аудит тест-системы

  • Разберись, почему тест-система упустила этот баг
  • Улучши тест-систему чтобы предотвратить класс подобных багов
  • Это обязательный шаг, не опциональный

Шаблон: Документация баг-фикса

## Bug Fix: [краткое название]

### Что сломалось
[Описание симптома с точки зрения пользователя/системы]

### Как воспроизводится
[Шаги воспроизведения или ссылка на тест]

### Корневая причина
[Настоящая причина, не симптом]

### Решение
[Что было изменено и почему именно так]

### Тест
- Файл: `path/to/test_file`
- Тест: `test_name`
- Статус до фикса: 🔴 RED
- Статус после фикса: 🟢 GREEN

### Deep Review
[Что проверили в похожих местах, что нашли]

### Патч тест-системы
[Что добавили/улучшили в тест-системе]

Шаблон: Аудит тест-системы после бага

## Test System Audit: [дата] — [тип бага]

### Баг, который проскочил
[Краткое описание]

### Почему тест-система не поймала?
- [ ] Тест не был написан
- [ ] Тест был написан неправильно (не тот assertion)
- [ ] Тест покрывал happy path, не edge case
- [ ] Интеграционный уровень не был покрыт
- [ ] Визуальное изменение без визуального теста
- [ ] Статический анализ не настроен на этот паттерн
- [ ] Другое: ___

### Что улучшаем
| Слой тест-системы | Текущее состояние | Что добавляем |
|---|---|---|
| Unit | | |
| Integration | | |
| E2E | | |
| Static analysis | | |
| Visual | | |

### Action items
- [ ] ...
- [ ] ...

### Принято в работу
- Исполнитель: 
- Дедлайн: 

Применение скилла

Когда тебе дают баг на фикс:

  1. Прочитай этот чеклист
  2. Иди по шагам строго по порядку
  3. Не перепрыгивай шаги
  4. Если застрял — скажи на каком шаге и почему
  5. Финальный PR должен включать: фикс кода + патч тест-системы + документацию по шаблону выше

Помни: быстрый фикс без теста — это не фикс, это технический долг с процентами.

安全使用建议
This skill is an instruction-only checklist (no code, no installs, no secret requests) and appears coherent and low-risk as-is. Before enabling it for an agent, consider the operational consequences: the protocol expects the agent to run tests, modify code, and open PRs—so you must decide what repository/CI/runner access the agent will have. If you grant the agent repo or CI tokens, follow least privilege: scope tokens narrowly, prefer ephemeral tokens, require human review/approval for merges, enable logging and CI job isolation, and avoid giving broad org-level credentials. Also confirm your CI/test environment is safe to run untrusted changes (e.g., sandboxed runners). If you want to be extra cautious, require the agent to only produce patch suggestions (diffs/PRs) and prevent automatic commits or merges without a human operator.
功能分析
Type: OpenClaw Skill Name: bug-fix-protocol Version: 1.0.0 The skill bundle defines a structured 8-step protocol for AI agents to follow during bug fixing, emphasizing test-driven development, root cause analysis, and documentation. It contains only Markdown instructions (SKILL.md and README.md) and metadata, with no executable code, network calls, or malicious directives.
能力评估
Purpose & Capability
The name/description match the content: an 8-step, testing-first protocol for bug fixes. Nothing in the skill requires unrelated resources (no env vars, binaries, or installs). The guidance (write failing test, find root cause, patch tests) is appropriate for the claimed purpose.
Instruction Scope
SKILL.md contains procedural guidelines and templates only; it does not instruct the agent to read arbitrary files, exfiltrate data, call external endpoints, or run specific system-level commands. All referenced actions (writing tests, running suites, making PRs) are consistent with debugging workflows.
Install Mechanism
No install spec and no code files—there is nothing to install or run on disk. This minimizes on-disk risk and is proportionate to an instruction-only skill.
Credentials
The skill declares no required environment variables, credentials, or config paths. The actions it recommends (running tests, patching test system, creating PRs) would in practice require repository/CI access, but the skill itself does not request those—this is proportionate and expected.
Persistence & Privilege
always is false and there are no install hooks. The skill can be invoked autonomously by models (platform default), which is normal; nothing in the skill asks for persistent agent privileges or to modify other skills.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install bug-fix-protocol
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /bug-fix-protocol 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Every bug fix = two fixes: code + test system. Never repeat the same bug.
元数据
Slug bug-fix-protocol
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Bug Fix Protocol 是什么?

Structured protocol for fixing bugs with AI agents. Prevents hallucinations and fix loops by enforcing step-by-step diagnosis before code changes. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 127 次。

如何安装 Bug Fix Protocol?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install bug-fix-protocol」即可一键安装,无需额外配置。

Bug Fix Protocol 是免费的吗?

是的,Bug Fix Protocol 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Bug Fix Protocol 支持哪些平台?

Bug Fix Protocol 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Bug Fix Protocol?

由 borodich(@borodich)开发并维护,当前版本 v1.0.0。

💬 留言讨论