deslop
Regression-safe cleanup of AI-generated bloat in C# code. Deletion-first, requires green tests before starting.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Regression-safe cleanup of AI-generated bloat in C# code. Deletion-first, requires green tests before starting.
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 | deslop |
| description | Regression-safe cleanup of AI-generated bloat in C# code. Deletion-first, requires green tests before starting. |
| argument-hint | ["path or feature to clean up","e.g. \"Main/Features/Execution\" or \"WargAttackService\""] |
Regression-safe cleanup of AI-generated bloat. Targets dead code, duplicate logic, over-abstraction, and unnecessary complexity — without changing behavior.
Scope: $ARGUMENTS (if empty, use git diff --name-only to find recently modified files)
dotnet test TAOM.Tests --no-build 2>&1 | tail -5
If tests are failing: STOP. Do not clean up broken code — you'll mask real bugs. Report the failures and exit.
Scan target files for these patterns. Do not change anything yet.
| Pattern | TAOM Example |
|---|---|
| Dead code | Private methods never called, unused fields, commented-out patch blocks |
| Redundant null guards | Null checks on DryIoc-injected services (the container guarantees non-null) |
| Restatement comments | // This method calculates the wage above CalculateWage() |
| Empty base calls | public Foo() : base() {} with no reason to exist |
| Adapter over-wrapping | Adapter that just delegates every property 1:1 with no translation logic |
| Single-use private methods | private bool IsValid() { return x != null; } called exactly once |
| Duplicate guard clauses | Same null/empty check copy-pasted across 3+ methods in the same class |
| Over-defensive catch blocks | try { } catch (Exception) { } around code that can't throw |
| Unused using directives | using TaleWorlds.Library; when nothing from that namespace is used |
| Harmony patch boilerplate noise | __state parameters declared but never used, __result assigned then immediately returned unchanged |
For each item found, record: file:line, pattern type, deletion safety (SAFE / RISKY).
Mark RISKY if:
Apply changes in this order — safest first:
using directives (compiler-verified safe)grep -r "MethodName" Main/ first)Hard limits — never do these:
#pragma warning suppressions without understanding why they existdotnet test TAOM.Tests --no-build 2>&1 | tail -10
If any test fails: revert the last change (git diff to identify it), report which deletion broke which test, and mark that item RISKY in the report. Do not delete it.
DESLOP REPORT
=============
Scope: [files or feature name]
Files touched: N
Lines deleted: N
Lines added: N (extractions only)
CLEANED:
- [file:line] [pattern] — [brief description]
- ...
SKIPPED (RISKY):
- [file:line] [pattern] — [reason skipped]
Tests: PASS (N tests) / FAIL (list failures)
NET: [clean / needs manual review of N risky items]