Skip to Content
MeowKit

Fix a Bug

Fix a bug with /mk:fix: find the root cause first, apply a minimal fix, verify it, and record a lesson when there is one.

/mk:fix is the debugging pipeline. It does not edit code first. It finds the root cause, fixes that cause with the smallest diff, and checks the fix against the failing behavior.

/mk:fix login fails after 24 hours

Without a mode flag it uses the standard profile. A typo or lint error can take the quick profile, and a cross-module race can take deep.

Choose a mode

BugCommandWhat happens
Typo, config or lint error with a known cause in two files or fewer/mk:fix "typo in README" --quickMinimal scout, compact root-cause proof, edit, before and after check
Logic bug in one module/mk:fix "session token not refreshed"Scout, investigate, diagnose, fix, verify
Cross-module or intermittent bug/mk:fix "race condition in payment queue"Standard plus a plan agreed with you when a contract or the architecture changes
Several independent failures/mk:fix "failing tests in checkout" --parallelOne developer agent per issue
Bug on a sensitive path/mk:fix "payment timeout" --reviewPauses at each step for you
You want the regression test first/mk:fix "auth bypass" --tddWrites the failing regression test before the fix

--auto runs the standard profile without pausing for progress. It stops where a human decision is required and never approves for you.

Steps

  1. Mode selection. Standard unless the quick profile's boundary is already proven.
  2. Check memory (standard and deep). One grep of .meowkit/memory/ for the bug class. A matching gotcha becomes the first hypothesis.
  3. Scout with mk:scout. Mandatory, even in quick mode.
  4. Diagnose. Standard and deep use mk:investigate, then mk:sequential-thinking to test hypotheses against evidence. The output is a root cause with an evidence chain and a confidence level.
  5. Root-cause proof. Six fields must be filled before the fix: exact symptom, reproduction evidence, expected against actual, root cause with file:line, why it appears now, and blast radius.
  6. Fix the root cause, not the symptom.
  7. Verify and prevent. Re-run the commands that failed before, add a regression test, and consider guards such as input validation.
  8. Finalize. Report the confidence, cause, changes and files. Write one memory entry only when the lesson is one the next session could not derive from the code or git history.

Stops

  • No fix before the scout and diagnose steps are done.
  • A confidence below medium means gathering more evidence first.
  • After three failed fix attempts the skill stops and questions the architecture with you. After an escalation like this, the journal-writer agent can record what was tried.

These are rules of the skill. No hook enforces them.

What helps along the way

ConcernWhat covers it
Root cause before a fixmk:investigate
Keeping edits in scopemk:freeze can lock edits to named directories while a debug session runs
Proof the bug existed and the fix closes itThe regression test
New security problems in edited filespost-write.cjs scans every file write
Verified, not assertedThe reviewer checks test output

After the fix

When the fix teaches something non-derivable, it goes into .meowkit/memory/gotchas.md through mewkit note. The next similar bug finds it in the memory check. A bug class that keeps coming back is a candidate for a rule in CLAUDE.md. Quick runs never write memory, and --no-capture skips the write.

Don't use /mk:fix for

  • New features. Use /mk:cook.
  • Architecture decisions. Use /mk:party or /mk:plan-creator.
  • Finding out why something is broken without fixing it. Use /mk:investigate.

Next steps

On this page