lint-cleanup-loop
Autonomous doc-rot loop — fix one lint finding at a time, re-lint, commit on improvement; runs until clean or N stuck iterations.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Autonomous doc-rot loop — fix one lint finding at a time, re-lint, commit on improvement; runs until clean or N stuck iterations.
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 | lint-cleanup-loop |
| description | Autonomous doc-rot loop — fix one lint finding at a time, re-lint, commit on improvement; runs until clean or N stuck iterations. |
This skill is autonomous. Once kicked off, it runs the experiment loop indefinitely. Do not pause to ask the user "should I keep going?". The user may be asleep or away. Stop only when the metric hits 0, when N consecutive iterations make no progress, or when the user manually interrupts.
Modeled on Karpathy's autoresearch program.md pattern. The full mapping:
| autoresearch | this skill |
|---|---|
train.py (agent edits) | TAOM docs touched per iteration |
prepare.py (read-only) | tools/lint_docs.py — the ground-truth metric |
program.md (human edits) | This file |
val_bpb (metric, lower is better) | total_findings from lint_docs.py --summary |
results.tsv (untracked) | .claude/state/lint-cleanup-loop/results.tsv (gitignored) |
autoresearch/<tag> branch | taom-lint/<tag> branch |
| 5-min time budget | per-iteration soft cap: 10 min wall clock |
| "keep" / "discard" / "crash" | same |
| "NEVER STOP" | same |
may27a). The branch taom-lint/<tag> must not already exist.git checkout -b taom-lint/<tag> from current HEAD.$ARGUMENTS (default all). One of:
stale_versions — the largest category (184 today), mostly 1.3.15-era references that should be 1.4.5dead_links — markdown link targets that don't resolveorphan_features — feature docs that no other doc referencesmissing_features — Main/Features/<X>/ without docs/features/<x>.mdall — run the linter on the full set; pick whichever has the highest countpython tools/lint_docs.py --summary and record the metric. Karpathy's "first run = baseline" rule (autoresearch program.md "The first run")..claude/state/lint-cleanup-loop/results.tsv with header commit\tcategory\tcount_before\tcount_after\tstatus\tdescription. Untracked by git — same convention as autoresearch/results.tsv (in .claude/state/ which is gitignored)./lint-cleanup-loop is the authorization — this skill sets disable-model-invocation: true (user-only) and disallowed-tools: AskUserQuestion (the "NEVER STOP to ask" discipline is enforced by the harness, not just prose), so there is no confirmation step to wait on.Kick off the loop. Do not seek confirmation until the metric reaches 0 or N consecutive iterations make no progress.
LOOP FOREVER (until stop condition):
python tools/lint_docs.py > .claude/state/lint-cleanup-loop/last-lint.md 2>&11.3.15 ref: if the context describes current v1.4.5 behavior, update. If it describes historical v1.3.15 research, leave it (and re-evaluate whether the file's name should match rca- or codex-adversarial- prefix to get auto-exempted).docs/INDEX.md to that doc, or delete the doc if it's vestigial.docs/features/TEMPLATE.md. Read the corresponding Main/Features/<X>/ source first.git commit the fix with a 50-char-or-fewer title:
docs(lint): fix <N> <category> in <file-or-area>
python tools/lint_docs.py --summary > .claude/state/lint-cleanup-loop/post.txt 2>&1
grep "^total_findings:" .claude/state/lint-cleanup-loop/post.txt (or the category-specific line).commit\tcategory\tbefore\tafter\tstatus\tdescription.git reset --hard HEAD~1. Status = discard. Loop continues.git reset --hard HEAD~1. Status = crash. Loop continues.Stop ONLY when one of:
--max-iters N, default unlimited).Do NOT stop to ask permission. Do NOT stop because the changes feel "too repetitive". Do NOT stop because you want a code review — the commits ARE the review surface.
crash, move on to a different finding.> file 2>&1 — never tee, never let lint output flood the conversation context.grep the specific lines you need from the captured file.tail -n 50 if you need to debug a crash.When choosing what to fix:
The loop runs on taom-lint/<tag> — isolated branch, no risk to bannerlord-1.4.5. When the loop stops (metric=0 or stuck):
---
tag: <tag>
category: <category>
start_count: <baseline>
end_count: <final>
iterations: <N>
commits: <kept>
discards: <reset>
crashes: <crash>
---
bannerlord-1.4.5. The user decides./lint-docs and stop — that's diagnostic, not action. This skill DOES the fixes./verify, ALSO update docs/INDEX.md, that's scope creep. One loop, one metric, one category..claude/state/lint-cleanup-loop/
├── results.tsv ← append-only TSV per the autoresearch convention
├── last-lint.md ← most recent full report (overwritten each iter)
└── post.txt ← most recent --summary output (overwritten each iter)
These live under .claude/state/ which is gitignored.
tools/lint_docs.py — the ground-truth metrictools/build_backlinks.py — runs implicitly via the post-commit hook (or call directly if needed)