← Back to Skills Marketplace
borodich

Bug Fix Protocol

by borodich · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
127
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install bug-fix-protocol
Description
Structured protocol for fixing bugs with AI agents. Prevents hallucinations and fix loops by enforcing step-by-step diagnosis before code changes.
README (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 должен включать: фикс кода + патч тест-системы + документацию по шаблону выше

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

Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install bug-fix-protocol
  3. After installation, invoke the skill by name or use /bug-fix-protocol
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Every bug fix = two fixes: code + test system. Never repeat the same bug.
Metadata
Slug bug-fix-protocol
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is 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. It is an AI Agent Skill for Claude Code / OpenClaw, with 127 downloads so far.

How do I install Bug Fix Protocol?

Run "/install bug-fix-protocol" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Bug Fix Protocol free?

Yes, Bug Fix Protocol is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Bug Fix Protocol support?

Bug Fix Protocol is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Bug Fix Protocol?

It is built and maintained by borodich (@borodich); the current version is v1.0.0.

💬 Comments