/pokayokay:fix <bug-description-or-task-id>from pokayokay
Diagnoses and fixes bugs using a structured pipeline — reproduce, diagnose root cause, apply minimal fix, and add a regression test. Supports --thorough flag for full agent pipeline.
Ships in pokayokay. Installing the plugin adds it to Claude Code.
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.Use systematic-debugging before edits and verification-before-completion
before reporting success. error-handling remains the implementation skill
for error-boundary, retry, API-error, and recovery-pattern changes after root
cause is known.
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 |
{APPROACH} | Design review skipped — follow codebase patterns (design review does not run in the bug-fix pipeline; do NOT put the fix strategy here — it belongs in {CONTEXT}) |
{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:
Use verification-before-completion:
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.Files this command reads when invoked
What the command file sets; muted values are Claude Code's defaults
bug-fixing, debugging, root-cause-analysis, regression-testing
7-day visitors to each command page
npx claudepluginhub srstomp/pokayokay --plugin pokayokay23 commands in this plugin
/apiAPI Design WorkflowDesign RESTful APIs with consistent patterns/archArchitecture Review WorkflowReview architecture and plan refactoring/auditFeature Audit WorkflowAudit feature completeness and identify gaps/cicdCI/CD Pipeline WorkflowCreate, debug, or optimize CI/CD pipelines/dbDatabase Design WorkflowDesign database schemas and migrations/docsDocumentation WorkflowCreate or improve documentationOther plugins' commands for the same job