/fix-issue
Fix a bug from error output, logs, or user description.
Usage
/fix-issue <error message or bug description>
Workflow
- •
Find or create issue (MANDATORY — do this BEFORE reading code or editing anything): Search open beads issues for a match. If none found, create one with
bd create --title="[Bug] ..." --type=bug --priority=2. Claim it withbd update <id> --status=in_progress. Do NOT proceed to step 2 without an in_progress issue. - •
Search closed issues for context: Use a sub-agent to search closed beads issues for prior fixes to similar problems:
codeTask(subagent_type="Explore", prompt="Search closed beads issues for context about <error/bug>. Run: bd list --status=closed | grep -i <keyword> Then bd show each relevant match. Return concise summary: relevant files, patterns, key decisions.")
- •
Locate the problem: Use error messages, stack traces, and closed issue context to find the relevant source files. Read them to understand the bug.
- •
Implement the fix: Make the minimal change needed. Follow project conventions (error wrapping, slog logging, constructor injection).
- •
Run tests: Execute
make testto verify the fix doesn't break anything. If the fix area lacks test coverage, add a test case. - •
Close the issue:
bd close <id> --reason="Fixed: <what was wrong and what was changed>"