Skip to main content

/fix-issue

Fix a bug with context from docs and code

Usage

/fix-issue <issue>

Arguments

ArgumentDescriptionRequired
issueIssue description or GitHub issue linkYes

What This Command Does

Fix Issue: $ARGUMENTS.issue

You are fixing an issue with full context from documentation and code.

Step 1: Understand the Issue

Parse the issue:

  • If GitHub link: Fetch issue details
  • If description: Identify keywords and affected area

Issue: $ARGUMENTS.issue

Search ./docs/ for related features:

  1. Search for keywords from issue in all spec.md files
  2. List all potentially related features

For each related feature found, read:

  • ./docs/<feature>/spec.md

Based on issue and docs:

  1. Search codebase for relevant functions/files
  2. Identify the likely location of the bug
  3. Map the code flow around the issue

Step 4: Analyze Root Cause

Compare:

  • What the code does
  • What the docs say it should do
  • What the issue reports is happening

Identify:

  • Is this a code bug (doesn't match docs)?
  • Is this a docs bug (docs are wrong)?
  • Is this a missing requirement (not in docs)?

Step 5: Propose Fix

Present fix approach:

  1. What will change
  2. Which files will be modified
  3. How this aligns with documentation

Ask user to confirm before implementing.

Step 6: Implement Fix

  1. Make the code change
  2. Validate fix matches documented behavior
  3. Check for side effects on related features

Step 7: Verify Fix

  • Issue is resolved
  • Fix matches documentation
  • No regression in related features
  • Code follows existing patterns

Auto-generated from .claude/commands/fix-issue.md