bugfix-protocol
Systematic 6-phase debugging protocol. Structured approach to bugs with quick checks, isolated testing, 20-minute rule, and bug report template.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Systematic 6-phase debugging protocol. Structured approach to bugs with quick checks, isolated testing, 20-minute rule, and bug report template.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Plant Unterricht, Lernangebote und individuelle Förderung ohne Berichtsgenerator oder persönliche Vorlagen.
Umbrella skill for cloud-bridged communication protocols between agents on different machines (Ping-Pong, agent-beam, listeners and future protocols). Use when coordinating work across machines via a shared sync folder or message yard.
Self-tuning cadence control loop for recurring agent scans. Use when a scheduled scan should sharpen its interval on activity and cool down on silence, without operator intervention.
Führt einen Hackathon end-to-end als Operator: von der Ausschreibung über Analyse, Ideenfindung, Bau, Beweisführung, Medienproduktion bis zur Einreichung — mit Zwischenstandsspeicher (STATE.md), aus dem jede Phase wieder aufgenommen werden kann. Der Nutzer ist human-in-the-loop: Richtungsvorgaben, Abnahmen und alle unumkehrbaren Aktionen (Public, Upload, Submit) bleiben beim Menschen.
Compose video-synced background scores from a storyline JSON using local waveform synthesis (numpy + ffmpeg). Styles: chiptune, ambient, electronic. Deterministic, offline, no cloud service.
Ordnet Büroaufgaben, Korrespondenz und Fristen ohne Bindung an eine bestimmte Office-App.
| name | bugfix-protocol |
| version | 1.0.0 |
| type | protocol |
| author | Lukas Geiger |
| created | "2026-03-12T00:00:00.000Z" |
| updated | "2026-03-12T00:00:00.000Z" |
| description | Systematic 6-phase debugging protocol. Structured approach to bugs with quick checks, isolated testing, 20-minute rule, and bug report template. |
| standalone | true |
| anthropic_compatible | true |
| bach_compatible | false |
| bach_origin | true |
| category | dev |
| tags | ["debugging","bugfix","protocol","python","pyqt6","systematic"] |
| language | de |
| status | active |
| dependencies | {"tools":[],"services":[],"protocols":[],"python":[]} |
| provenance | {"origin":"bach","origin_path":"system/skills/workflows/bugfix-protokoll.md","origin_version":"1.0.0","origin_repo":"github.com/ellmos-ai/bach","last_sync_from_origin":"2026-03-12","last_sync_to_origin":"None","local_changes_since_sync":true} |
Deutsch — Offizielle Deutsch-Version / Documento Oficial en Deutsch.
A structured approach to bugs — from symptom analysis to verification. Prevents aimless trial-and-error and ensures fixes are sustainable.
| Phase | Name | Goal | Max. Time |
|---|---|---|---|
| 1 | Quick Checks | Rule out obvious causes | 2 min |
| 2 | Diagnosis | Locate root cause | 10 min |
| 3 | Isolated Test | Make bug reproducible | 5 min |
| 4 | Fix | Minimal correction | 10 min |
| 5 | Verification | Verify fix + check side effects | 5 min |
| 6 | Documentation | Preserve knowledge | 2 min |
20-Minute Rule: If no progress after 20 minutes, change approach or seek help.
Before diving deep — check the most common causes:
__pycache__, restart# Clear cache (Deutsch)
find . -name "__pycache__" -type d -exec rm -rf {} + 2>&1
find . -name "*.pyc" -delete 2>&1
# Check imports (Deutsch)
python -c "import modulename"
# Check syntax (Deutsch)
python -m py_compile file.py
git diff, git log --oneline -10Depending on the project, specialized diagnostic scripts may be helpful:
| Tool | Purpose |
|---|---|
import_diagnose.py | Analyze import problems |
method_analyzer.py | Check method signatures |
env_checker.py | Validate environment variables/paths |
Note: Create project-specific diagnostic tools or use existing ones. The systematic approach matters, not the specific tool.
# 1. Print debugging (quick but effective) (Deutsch)
print(f"DEBUG: variable={variable!r}, type={type(variable)}")
# 2. Breakpoint (interactive) (Deutsch)
breakpoint() # Python 3.7+
# 3. Extended traceback (Deutsch)
import traceback
traceback.print_exc()
# 4. Logging instead of print (Deutsch)
import logging
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger(__name__)
logger.debug(f"State: {state!r}")
Goal: Reproduce the bug with minimal code.
# test_bug.py — Minimal Reproduction Test (Deutsch)
"""
Bug: [Short description]
Expected: [What should happen]
Actual: [What happens instead]
"""
# Minimal setup (Deutsch)
# ... only the essentials (Deutsch)
# Bug trigger (Deutsch)
# ... exact code that triggers the bug (Deutsch)
# Expected result (Deutsch)
# assert result == expected, f"Got {result}" (Deutsch)
git bisect start, git bisect bad, git bisect good <commit># BAD: Treating the symptom (Deutsch)
try:
result = broken_function()
except: # Swallow everything
result = default_value
# GOOD: Fix the root cause (Deutsch)
def broken_function():
if input_data is None: # Actual cause: missing None check
return default_value
return process(input_data)
| Category | Typical Fix |
|---|---|
| None/Null | Guard clause: if x is None: return default |
| Index error | Bounds check: if i < len(lst) |
| Type error | Explicit conversion: str(x), int(x) |
| Import error | Fix path, install package |
| Encoding | Specify UTF-8 explicitly: encoding='utf-8' |
| Race condition | Lock/Mutex, or change order |
| State bug | Check initialization, add reset |
# Unit tests (Deutsch)
python -m pytest tests/ -v
# Only affected tests (Deutsch)
python -m pytest tests/test_module.py -v -k "test_name"
# Type check (Deutsch)
python -m mypy file.py
# Lint (Deutsch)
python -m flake8 file.py
## Bug Report: [Short Title]
**Date:** YYYY-MM-DD
**Severity:** critical / high / medium / low
**Component:** [Module/File]
### Symptom
[What the user sees / error message]
### Root Cause
[Technical root cause]
### Fix
[What was changed + why]
### Affected Files
- `file1.py` — [Change]
- `file2.py` — [Change]
### Prevention
[How can this type of bug be prevented in the future?]
fix: [Short description of the fix]
Cause: [Root cause in one sentence]
Fix: [What was changed]
Test: [How verified]
This section is relevant for desktop GUI projects with PyQt6/PySide6.
| Trap | Problem | Solution |
|---|---|---|
| Signal-Slot Disconnect | Signal connected but handler doesn't run | print in handler, check signature |
| Thread Safety | GUI update from worker thread | QMetaObject.invokeMethod or use signal |
| Layout Cascade | Widget invisible/misplaced | widget.show(), check layout hierarchy |
| Event Loop Block | GUI freezes | Move long operations to QThread |
| Garbage Collection | Widget suddenly disappears | Keep reference as self.widget |
# Dump widget hierarchy (Deutsch)
def dump_widget_tree(widget, indent=0):
print(" " * indent + f"{widget.__class__.__name__}: {widget.objectName()}")
for child in widget.findChildren(QWidget):
if child.parent() == widget:
dump_widget_tree(child, indent + 2)
# Signal debugging (Deutsch)
from PyQt6.QtCore import QObject
original_connect = QObject.connect
def debug_connect(self, *args, **kwargs):
print(f"CONNECT: {self.__class__.__name__} -> {args}")
return original_connect(self, *args, **kwargs)
BUG FOUND?
|
v
[Phase 1: Quick Checks] ──── Obvious? -> FIX
|
v
[Phase 2: Diagnosis] ────────── Cause clear? -> Phase 4
|
v
[Phase 3: Isolated Test] ── Reproducible? -> Phase 4
| |
| Not reproducible?
| |
| Add logging,
| wait for recurrence
v
[Phase 4: Fix] ─────────────── Minimal + understood
|
v
[Phase 5: Verification] ────── Tests green? -> Phase 6
| |
| Tests red? -> Back to Phase 4
v
[Phase 6: Documentation] ───── Bug report + commit
If you're stuck after 20 minutes:
git stash, start completely fresh