Loading...
Loading...
Autonomous iteration loops for .NET: drive a broken build or failing test suite to green with bounded iterations, progress detection, and fail-safe guards that prevent infinite retries and wasted tokens. The build-fix loop (dotnet build, parse, categorize, fix, rebuild) is the primary flow; the test-fix loop is a first-class variant. Invoke when the build is broken, after a major refactor or dependency update, or when the user says "fix the build", "build is broken", "make it compile", "make the tests pass", "fix failing tests", "keep going until it works", "autonomous", "loop", "auto-fix", or "keep fixing".
npx skill4agent add codewithmukesh/dotnet-claude-kit build-fixdotnet builddotnet testusingIteration 3/5: fixed CS0246 by adding using System.Text.Json, 2 remaindotnet builderror CS####| Category | Codes | Fix strategy |
|---|---|---|
| Missing using/reference | CS0246, CS0234 | Add using, package, or project ref |
| Type mismatch | CS0029, CS1503 | Check expected type, cast or convert |
| API change | CS0117, CS7036 | Check new signature, update call sites |
| Nullability | CS8600–CS8604 | Add null check, |
| Ambiguity / duplicate | CS0104, CS0121, CS0111 | Qualify namespace, remove dupe |
| Missing member | CS1061 | Check spelling, verify member exists |
| Missing implementation | CS0535 | Implement interface/abstract members |
| Obsolete API | CS0618 | Replace with recommended alternative |
dotnet builddotnet testdotnet test --no-buildAssert.Equal(expected, actual)Assert.NotNull(actual)/de-sloppify/scaffold| Type | Name | Purpose |
|---|---|---|
| Skill | | Capture fix patterns in MEMORY.md |
| Agent | | Consulted for architectural error patterns |
get_diagnosticsfind_symbolfind_referencesget_project_graphUser: /build-fix
Claude: Running dotnet build...
Found 12 errors across 4 files.
Iteration 1/5:
- 6 errors: Missing namespace (CS0246) — adding using directives
- 3 errors: Type mismatch (CS1503) — updating method signatures
- 3 errors: Interface not implemented (CS0738) — package API changed
Rebuilding... 3 errors remaining.
Iteration 2/5:
- 3 errors: CS0738 after xunit.v3 upgrade
- IAsyncLifetime.InitializeAsync now returns ValueTask (was Task in v2),
and DisposeAsync comes from IAsyncDisposable
- Updating 3 test fixtures to the ValueTask signatures
Rebuilding... 0 errors. Build is green.
Running dotnet test... All 47 tests passed.
Added to Memory > Packages: "xunit.v3 IAsyncLifetime uses ValueTask signatures"/verify/tdd/de-sloppify