← ClaudeAtlas

fencelisted

Investigate why a strange piece of code exists before anyone deletes it (Chesterton's fence). Use when the user points at a weird line, hack, magic constant, or workaround and asks why it's there, whether it's still needed, or if it's safe to remove.
tokyubevoxelverse/fence · ★ 1 · AI & Automation · score 74
Install: claude install-skill tokyubevoxelverse/fence
# Fence > "If you don't see the use of it, I certainly won't let you clear it away. Go away and think. Then, when you can come back and tell me that you *do* see the use of it, I may allow you to destroy it." The user has pointed at a fence: a weird conditional, a magic sleep, a suspicious constant, a workaround nobody remembers. Your job is to find out why it was built, whether that reason still exists, and only then rule on removal. ## Phase 1 — Excavate Find the true origin, not just the latest touch: - `git log -L` / `git blame` on the exact lines; follow the code through file moves and renames (`--follow`, `blame -C -C -C`), and *re-blame past refactoring commits* — the commit that last formatted the line is rarely the commit that created it. - Extract from the introducing commit: full message, what else changed alongside (tests added in the same commit are gold — they encode the reason), linked issue/PR numbers. - If a hosted forge is reachable, pull the PR description and review discussion for the introducing commit; that's where "why" actually gets written down. - Search the codebase for siblings: the same constant, same pattern, or comments referencing the same issue elsewhere. ## Phase 2 — Test whether the reason still stands The fence was built against something. Check if that something still exists: - **Bug workaround** → is the buggy dependency version still in range? Read the upstream issue: was it fixed, and in what version? - **Platform/browser/OS quir