Diagnose and fix a bug with structured workflow
Diagnoses and fixes software bugs through a structured workflow that includes reproduction, root cause analysis, and regression testing.
/plugin marketplace add srstomp/pokayokay/plugin install pokayokay@pokayokay<bug-description-or-task-id>Fix bug: $ARGUMENTS
Check $ARGUMENTS for --thorough flag:
--thorough: Full agent pipeline. Read and follow skills/work-session/references/bug-fix-pipeline.md instead of this command. Stop reading here.If $ARGUMENTS is a task ID:
npx @stevestomp/ohno-cli get <task-id>
If $ARGUMENTS is a description:
npx @stevestomp/ohno-cli create "Bug: $ARGUMENTS" -t bug
npx @stevestomp/ohno-cli start <task-id>
Before fixing, confirm:
If cannot reproduce:
Investigate:
git log)Document findings:
## Root Cause
[Explanation of why the bug occurs]
Before coding:
Read agents/templates/implementer-prompt.md and fill these variables:
| Variable | Value |
|---|---|
{TASK_ID} | Task ID from Step 1 |
{TASK_TITLE} | Task title from Step 1 |
{TASK_DESCRIPTION} | Root cause + reproduction steps + fix strategy from Steps 2-4 |
{ACCEPTANCE_CRITERIA} | See below |
{CONTEXT} | Bug fix context block (see below) |
{RELEVANT_SKILL} | error-handling |
{WORKING_DIRECTORY} | Project root |
{RESUME_CONTEXT} | Empty |
Acceptance criteria to use:
- [ ] Bug described in root cause is fixed
- [ ] Regression test exists (fails without fix, passes with fix)
- [ ] All existing tests pass
- [ ] Fix is minimal — no refactoring, no "while I'm here" changes
- [ ] Commit message follows: fix: [description]
Context block to use:
## Bug Fix Context
### Root Cause
{from Step 3}
### Reproduction Steps
{from Step 2}
### Files to Change
{from Step 4}
### Fix Strategy
{from Step 4}
### MANDATORY: Regression Test
Write a test that reproduces the original bug condition, FAILS without the fix, and PASSES with the fix.
Dispatch:
Task tool:
subagent_type: "pokayokay:yokay-implementer"
description: "Fix: {task title}"
prompt: [filled implementer-prompt.md]
mode: "bypassPermissions"
Do NOT dispatch review agents. Verify the result yourself:
Check the implementer's report:
Run the test suite:
yokay-fixer with test output. Max 2 attempts.Self-review the diff:
npx @stevestomp/ohno-cli done <task-id> --notes "Root cause: X. Fixed by: Y. Test: Z"
## Bug Fix Complete
**Bug**: [task-id] - [description]
**Root Cause**: [explanation]
**Fix**: [summary of changes]
**Regression Test**: [test file/name]
**Files Changed**: [list]
Commit: [hash] fix: [message]
--thorough: Use full agent pipeline (implementer + spec review + quality review). Reads bug-fix-pipeline.md. Higher context cost.