executar-bugfix
Original:🇺🇸 English
Translated
Reads documented bugs from bugs.md, analyzes root causes, implements fixes with regression tests, and validates the full test suite. Prioritizes fixes by severity (high to low). Updates bugs.md with correction status and generates a final bugfix report. Use when the user asks to fix bugs, resolve issues, or run the bugfix workflow for a feature. Do not use for new feature implementation, code review, or QA testing.
1installs
Added on
NPX Install
npx skill4agent add lucasduarteinacio/ai-skills executar-bugfixTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Bug Fix Execution
Procedures
Step 1: Context Analysis (Mandatory)
- Read the bugs file at and extract ALL documented bugs.
./tasks/prd-[feature-slug]/bugs.md - Read the PRD at to understand affected requirements.
./tasks/prd-[feature-slug]/prd.md - Read the Tech Spec at to understand relevant technical decisions.
./tasks/prd-[feature-slug]/techspec.md - Review project rules for compliance in fixes.
- Do NOT skip this step — full context understanding is fundamental for quality fixes.
Step 2: Plan Fixes (Mandatory)
- For each bug, generate a planning summary:
- Bug ID, Severity (High/Medium/Low), Affected Component.
- Root Cause analysis.
- Files to modify.
- Fix strategy description.
- Planned regression tests (unit, integration, E2E).
- Use Context7 MCP to analyze documentation of involved languages, frameworks, and libraries.
Step 3: Implement Fixes (Mandatory)
- Fix bugs in severity order: High first, then Medium, then Low.
- For each bug follow this sequence:
a. Locate and read the affected code.
b. Reason about the flow causing the bug.
c. Implement the root-cause fix — no superficial workarounds.
d. Run after each fix. e. Run existing tests to ensure no regressions.
bun run typecheck
Step 4: Create Regression Tests (Mandatory)
- For each fixed bug, create tests that:
- Simulate the original bug scenario (test must fail if the fix is reverted).
- Validate the correct behavior with the fix applied.
- Cover related edge cases.
- Choose test type based on bug nature:
- Unit test: Bug in isolated function/method logic.
- Integration test: Bug in module communication (e.g., controller + service).
- E2E test: Bug visible in the UI or full flow.
Step 5: Visual Validation with Playwright MCP (Mandatory for frontend bugs)
- For bugs affecting the UI:
a. Use to access the application. b. Use
browser_navigateto verify page state. c. Reproduce the flow that caused the bug. d. Usebrowser_snapshotto capture evidence of the fix.browser_take_screenshot
Step 6: Final Test Execution (Mandatory)
- Run ALL project tests: .
bun run test - Verify ALL pass with 100% success.
- Run type checking: .
bun run typecheck - The task is NOT complete if any test fails.
Step 7: Update bugs.md (Mandatory)
- For each fixed bug, append to its entry:
- Status: Fixed.
- Applied fix: Brief description.
- Regression tests: List of created tests.
Step 8: Generate Final Report
- Read the report template at .
assets/bugfix-report-template.md - Fill in all sections with actual results.
Error Handling
- If bugs.md does not exist, halt and report to the user.
- If a bug requires significant architectural changes, document the justification before proceeding.
- If new bugs are discovered during fixes, document them in bugs.md.
- Begin implementation immediately after planning — do not wait for approval.