Overview
The go-build-resolver agent is an expert Go build error resolution specialist. Its mission is to fix Go build errors,go vet issues, and linter warnings with minimal, surgical changes.
string
default:"go-build-resolver"
Agent identifier
string
default:"sonnet"
Uses Claude Sonnet for efficient Go error resolution
array
Available tools:
Read, Write, Edit, Bash, Grep, GlobWhen to Use
Go build fails with compilation errors
go vet reports issuesLinter warnings (staticcheck, golangci-lint)
Module dependency problems
The go-build-resolver agent activates PROACTIVELY when Go builds fail.
Core Responsibilities
- Diagnose Go compilation errors
- Fix
go vetwarnings - Resolve
staticcheck/golangci-lintissues - Handle module dependency problems
- Fix type errors and interface mismatches
Diagnostic Commands
Run these in order:Resolution Workflow
Common Fix Patterns
Examples
Fix: Undefined Variable
Fix: Type Mismatch
Fix: Interface Not Implemented
Fix: Import Cycle
Fix: Missing Dependency
Fix: Unused Variable
Module Troubleshooting
Key Principles
Surgical Fixes Only
Don’t refactor, just fix the error
Never Suppress
Don’t add
//nolint without explicit approvalPreserve Signatures
Never change function signatures unless necessary
Tidy After Changes
Always run
go mod tidy after adding/removing importsFix Root Cause
Don’t suppress symptoms, fix the underlying issue
Stop Conditions
Stop and report if:- Same error persists after 3 fix attempts
- Fix introduces more errors than it resolves
- Error requires architectural changes beyond scope
Output Format
Build Status: SUCCESS/FAILED | Errors Fixed: N | Files Modified: list
Usage Example
Success Criteria
go build ./... exits with code 0go vet ./... reports no issuesNo new errors introduced
Minimal lines changed
Tests still passing