/build-fix Command
Incrementally fix build and type errors with minimal, safe changes.What This Command Does
- Detect Build System - Identify project type and build command
- Parse and Group Errors - Group by file, sort by dependency order
- Fix Loop - Fix one error at a time, verify after each
- Summary - Report errors fixed, remaining, and new errors
Supported Build Systems
Fix Strategy
- Build errors first - Code must compile
- Vet warnings second - Fix suspicious constructs
- Lint warnings third - Style and best practices
- One fix at a time - Verify each change
- Minimal changes - Don’t refactor, just fix
Fix Loop Process
For each error:- Read the file - See error context (10 lines around error)
- Diagnose - Identify root cause
- Fix minimally - Smallest change that resolves error
- Re-run build - Verify error is gone
- Move to next - Continue with remaining errors
Command Syntax
Example Session
Common Errors Fixed
Stop Conditions
The command stops and asks for help if:- Same error persists after 3 attempts
- Fix introduces more errors than it resolves
- Requires architectural changes (not just a build fix)
- Missing external dependencies need installation
Integration with Other Commands
- Use after making code changes
- Use before running tests with
/verify - Language-specific:
/go-buildfor Go projects
Related
- Agent:
agents/build-error-resolver.md - Commands:
/go-build,/verify,/tdd