**TL;DR**: `/build-fix` - Fix build, type, and compilation errors sequentially with minimal changes.

---

## Usage

```bash
/build-fix                  # Fix all current build errors
/build-fix --types          # Fix type errors only
/build-fix --imports        # Fix import errors only
```

## Philosophy

**Minimal changes only.** This command:
- Fixes only what is broken
- Does NOT refactor surrounding code
- Does NOT add "improvements"
- Preserves existing patterns

## How It Works

1. **Parse errors** - Extract error messages from build output
2. **Classify** - Group by type (syntax, type, import, config)
3. **Fix sequentially** - One error at a time
4. **Verify** - Run build after each fix
5. **Report** - Summary of fixes applied

## Supported Errors

### Python
```bash
mypy src/           # Type errors
python -m py_compile  # Syntax errors
pytest --collect-only  # Import errors
```

### TypeScript/JavaScript
```bash
tsc --noEmit        # Type errors
npm run build       # Build errors
eslint .            # Lint errors
```

## Example Session

```
Build failed with 3 errors

Error 1/3: TS2345 - Argument of type 'string | undefined'
  → Added null coalescing: value ?? ''
  → Verified: ✅

Error 2/3: TS2307 - Cannot find module '@/utils'
  → Fixed import path: '../utils'
  → Verified: ✅

Error 3/3: TS2339 - Property 'map' does not exist on 'never'
  → Added type assertion: (data as Item[]).map(...)
  → Verified: ✅

Build succeeded ✅
```

## Integration

This command invokes the **Build Error Resolver Agent** which:
- Parses error messages accurately
- Applies minimal, targeted fixes
- Verifies each fix before proceeding
