Get the FREE Ultimate OpenClaw Setup Guide →

fix-bug

Scanned
npx machina-cli add skill ajaywadhara/agentic-sdlc-plugin/fix-bug --openclaw
Files (1)
SKILL.md
1.2 KB

Arguments: $BUG_DESCRIPTION

You are a QA engineer and developer working together.

STEP 1 — UNDERSTAND THE BUG

Read $BUG_DESCRIPTION carefully. If insufficient detail, ask: "What were you doing when this happened? What did you expect to see? What did you see instead?"

STEP 2 — REPRODUCE FIRST (non-negotiable)

Before fixing anything: Write a Playwright test to tests/e2e/regression/[bug-id].spec.ts that replicates the exact user journey that triggers the bug. Run it. It must be RED (failing) before you touch the implementation.

If you can't make it fail, you don't understand the bug yet. Do not proceed until the test is RED.

STEP 3 — FIX

Now fix the implementation. Run the regression test. It must turn GREEN. Run the full test suite. Nothing else must break.

STEP 4 — PERMANENT RESIDENCE

The regression test lives in tests/e2e/regression/ forever. It is never deleted. It runs in every CI pipeline from this point forward.

Update qa/QUALITY_LOG.md:

  • Bug ID, date, description, affected feature, fix summary

Source

git clone https://github.com/ajaywadhara/agentic-sdlc-plugin/blob/main/skills/fix-bug/SKILL.mdView on GitHub

Overview

This skill enforces a bug-to-test pipeline: reproduce the bug as a failing end-to-end test before coding, then fix the issue and preserve a forever regression test. It ensures bugs are verifiable in isolation and guarded against regressions in future releases.

How This Skill Works

You read the bug description, then create a Playwright e2e regression test at tests/e2e/regression/[bug-id].spec.ts that mirrors the exact user journey triggering the bug and verify it fails (RED) before touching code. After implementing the fix, re-run the regression test to confirm it passes (GREEN) and run the full suite to ensure nothing else breaks. The regression test remains in the repo forever and is accompanied by an update to qa/QUALITY_LOG.md.

When to Use It

  • Need to reproduce a reported bug with a regression test that fails before any fix
  • Before touching implementation code, to validate the bug through a red test
  • You want a permanent regression guard that survives refactors and releases
  • CI should run the full regression suite on every change
  • Coordinating with QA and developers and documenting the bug details in QA_LOG

Quick Start

  1. Step 1: Understand the bug by reading BUG_DESCRIPTION and ask clarifying questions if details are insufficient
  2. Step 2: Reproduce First — create tests/e2e/regression/[bug-id].spec.ts that mirrors the user journey and verify it RED
  3. Step 3: Fix the implementation, run the regression test to GREEN, then run the full suite

Best Practices

  • Write a precise bug description and convert it into a red regression test
  • Use a unique bug-id and place the spec at tests/e2e/regression/[bug-id].spec.ts
  • Ensure the regression test fails RED before touching production code
  • Keep the regression test forever; do not delete it
  • Update qa/QUALITY_LOG.md with bug-id, date, description, affected feature, and fix summary

Example Use Cases

  • Bug in login flow where first login attempt fails; regression test added at tests/e2e/regression/login-fail.spec.ts
  • Checkout bug where cart totals differed from expected; regression regression spec created
  • Search results misbehavior when applying filters; regression test added under tests/e2e/regression/search-filter.spec.ts
  • Password reset redirects to incorrect page; regression test added to repository
  • Image upload occasionally times out on slow networks; regression test persisted for CI

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers