bug-fix-workflow

Diagnose reproducible defects and encode failing BDD regression tests before fixing.

2|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/grimlor/universal-dev-skills --skill bug-fix-workflow-grimlor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bug-fix-workflow
Source: https://github.com/grimlor/universal-dev-skills/tree/main/skills/bug-fix-workflow
Command: npx skills add https://github.com/grimlor/universal-dev-skills --skill bug-fix-workflow-grimlor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you reliably diagnose and repair defects when the system’s behavior diverges from intent, ensuring the fix is verified by a regression guard rather than accidental non-reproduction.

Core Features & Use Cases

  • Reproduce before diagnosing: collect precise reproduction steps from the user and confirm them.
  • Write a failing BDD test first: encode the bug as a behavioral requirement with a Given/When/Then scenario and verify the test fails for the right reason.
  • Find root cause, not symptom: determine targeted vs structural defect based on evidence, then choose the correct fix path.
  • Minimal fix with full verification: apply the smallest change for targeted bugs and confirm the full suite remains green (including coverage on modified files).
  • Structural transition when needed: if the defect is structural, transition to refactor-workflow while carrying the failing test as the acceptance criterion.

Quick Start

Use the bug-fix workflow when a defect is reported or discovered and you need a verified correction with a permanent regression test.

Frequently Asked Questions about bug-fix-workflow

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix a bug using BDD testing and regression guards?

To fix a bug using BDD testing, you first capture reproduction steps, then encode the defect as a failing Given/When/Then BDD test, and finally apply a targeted fix until the full suite passes. This ensures the bug fix is verified by a permanent regression guard.

What is the best way to perform root cause analysis for a reproducible defect?

Root cause analysis for a reproducible defect requires determining whether the issue is a targeted error needing a minimal code change or a structural flaw requiring refactoring. You must gather evidence from reproduction steps to choose the correct fix path and verify the resolution.

How do I write a failing BDD test for a bug report?

You write a failing BDD test by translating the bug report into a Given/When/Then behavioral scenario. You then run the test to confirm it fails specifically for the reported defect, establishing a baseline before you apply the actual code fix.

When should I transition from bug fixing to a structural refactor workflow?

You should transition to a refactor workflow when root cause analysis identifies the defect as structural rather than a targeted error. You carry the newly written failing BDD test into the refactor workflow to serve as the acceptance criterion.

Why does my bug fix need full-suite test verification and coverage validation?

Full-suite test verification and coverage validation are needed to confirm your code change fixed the defect without introducing regressions. This process guarantees the modified files maintain adequate test coverage and the observed behavior matches intended requirements.