build-fix
Incrementally fix dotnet build errors with minimal diffs, one error at a time
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Incrementally fix dotnet build errors with minimal diffs, one error at a time
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Root-cause native Bannerlord CTDs (AccessViolation in TaleWorlds.Native.dll) via Event Log offsets, offline disassembly, and live debugger forensics. No symbols needed.
Dispatch an independent Codex verification job directly via `codex exec` Bash call, then retrieve and present results
Inspect all changed files, group by logical concern, and guide atomic per-concern commits following TAOM's 50/72 rule and commit trailer convention.
Load a snapshot saved by /context-save and present it so this session can pick up where the last one left off without re-deriving decisions.
Launch parallel deep-dive agents to review completed work for quality, standards, compatibility, completeness, and cross-system data flow
Respond to a Bannerlord engine update (Steam force-bump or deliberate migration) — preserve the decompile baseline, regen, diff, re-verify bindings and creature data, control-battle.
| name | build-fix |
| description | Incrementally fix dotnet build errors with minimal diffs, one error at a time |
| argument-hint | [{"optional":"specific error or file to focus on"}] |
Incrementally fix build errors with minimal, safe changes. Fix the error, not the architecture.
dotnet build Main --no-restore 2>&1
Capture the full output. If build succeeds, report success and stop.
error CS#### lines from build outputFor each error:
dotnet build Main --no-restore 2>&1 to verifyTrack attempts per error. An "attempt" is one Edit + re-build cycle targeting the same error code at the same file location.
| Attempts on the same error | Action |
|---|---|
| 1 | Try the most likely fix. |
| 2 | If first didn't work, re-Read the file (it may be stale) and try a different approach. |
| 3 | Final attempt — the third fix should look meaningfully different from the first two. |
| 4+ | STOP. Do not iterate further. Report what you tried and ask the user. |
The error code/file location counts as "the same" only when the build output line is identical or near-identical. A genuinely-changed error (different code, different file, or moved line >5 away) resets the counter — but flag if you suspect cascading whack-a-mole.
STOP and ask the user (or escalate to a more appropriate skill) if any of these are true:
| Condition | Escalate to |
|---|---|
| Retry budget triggers (4th attempt on same error) | /investigate — root-cause workflow with auto-scope-lock |
| A fix introduces more errors than it resolves | /investigate — likely a wrong-layer fix |
| The fix requires architectural changes | Stop. Ask the user. May warrant /new-adr or /scope-check. |
| Errors stem from missing NuGet packages | Run dotnet restore, then resume. If that doesn't help, report (env failure). |
| Errors stem from TaleWorlds API changes | /research first — verify v1.3.15 signatures via ilspycmd, NOT the v1.4 decompile |
| Errors stem from environment problems (path, permissions, missing tools) | Report, don't fix — see .claude/rules/environment-failures.md |
After all errors are fixed (or guardrails triggered):
BUILD FIX REPORT
================
Errors fixed: X
- CS0246 in Main/Features/Foo/FooService.cs (missing using)
- CS0103 in Main/Features/Foo/Hooks/FooHook.cs (renamed method)
Errors remaining: Y (if any)
New errors introduced: 0 (should always be zero)
Build status: PASS/FAIL
| Error | Typical Fix |
|---|---|
CS0246: type or namespace not found | Add missing using statement or NuGet reference |
CS0103: name does not exist | Fix typo, add using, or update to renamed API |
CS0535: does not implement interface member | Add missing method to class |
CS0115: no suitable method found to override | Check v1.3 API changes — method signature may have changed |
CS0029: cannot implicitly convert type | Add cast or fix type mismatch |
CS0234: type or namespace does not exist in namespace | v1.2->v1.3 namespace change — use /research to find new location |
CS0012: type defined in unreferenced assembly | Add assembly reference to .csproj |
CS8602: dereference of possibly null reference | Add null check or ! operator |
DO:
using statementsDON'T:
#pragmaDirectory.Build.propsdotnet test TAOM.Tests instead/new-feature or plan mode/research firstIf $ARGUMENTS is provided, focus on that specific file or error first.