AgentSkillsCN

chestertons-fence

在着手移除某样事物之前,务必先弄清它最初被放置于此的原因——若只知其然,却不知其所以然,改革之举很可能会招致意料之外的后果

SKILL.md
--- frontmatter
name: chestertons-fence
description: Before removing something, understand why it was put there in the first place—reforms without understanding cause unintended consequences

Chesterton's Fence

One-Liner

Before removing something, understand why it was put there in the first place—reforms without understanding cause unintended consequences.

Core Insight

Chesterton's Fence principle states that you should never destroy a fence, change a rule, or remove a system until you fully understand why it exists. The reform-minded person who encounters an apparently useless barrier should first discover its purpose before tearing it down. If they cannot explain why the fence was erected, they lack the knowledge needed to safely remove it.

Key Distinction: The burden of proof lies with the reformer, not the status quo. This inverts the common assumption that old = bad, new = good.

Chesterton's Original Formulation (1929):

"In the matter of reforming things, as distinct from deforming them, there is one plain and simple principle... There exists in such a case a certain institution or law; let us say, for the sake of simplicity, a fence or gate erected across a road. The more modern type of reformer goes gaily up to it and says, 'I don't see the use of this; let us clear it away.' To which the more intelligent type of reformer will do well to answer: '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.'"

Mental Model

code
Scenario: You encounter a fence across a road

Naive Reformer:
"This fence serves no purpose" → Tears it down → Cattle escape

Chesterton's Approach:
"Why is this fence here?"
→ Research: Built to contain cattle
→ Verify: Cattle still present?
→ Consider: Alternatives to fencing?
→ Only then decide: Remove or keep

The fence existed for a reason. Discovering that reason
enables informed decision-making.

Second-Order Thinking Connection: Removing the fence is first-order (fence gone = improvement). Understanding why it exists before removing it reveals second-order consequences (no fence = escaped cattle).

When to Use

  • Code refactoring: Before deleting "legacy" code or "weird" patterns
  • Process improvement: Removing bureaucratic procedures or requirements
  • Organizational change: Eliminating departments, roles, or practices
  • Architecture decisions: Replacing established technologies or patterns
  • System redesign: Modernizing infrastructure or workflows
  • Policy reform: Changing rules, regulations, or guidelines
  • Inheriting systems: Taking over from previous teams/generations
  • Encountering traditions: Considering changes to organizational practices

Apply when: Encountering something that seems unnecessary, outdated, or irrational. The more confident you are it's useless, the more important to understand it first.

Don't apply when: Clear emergency requiring immediate action, you built the fence yourself and remember why, cost of investigation exceeds cost of potential failure, system has no defenders and zero documentation (likely abandoned), or reversible experiment where restoration is trivial.

Execution Steps

1. Identify the "Fence"

Notice something that appears unnecessary, inefficient, or irrational. Document what seems wrong about it.

Example: "This API validation layer duplicates database constraints—seems redundant."

2. Investigate Original Purpose

Research when and why it was created.

Questions to ask:

  • When was this created? By whom?
  • What problem was it solving?
  • What were the conditions at the time?
  • Has anyone tried to remove it before? What happened?

Sources: Git history, documentation, interviews with creators, archived discussions, regulatory requirements, incident reports

Example: Git blame reveals validation was added after production incident where malformed data crashed the database despite constraints.

3. Understand Context Changes

Determine if the original reason still applies or if conditions have changed.

Framework: Past Context → Current Context → Still Relevant?

Example: Original reason: Database didn't support constraint enforcement (2015). Current: Database upgraded, constraints now work (2023). Still relevant? Partially—handles edge cases database can't.

4. Map Dependencies and Side Effects

Identify what else relies on the "fence" existing.

Questions:

  • What systems depend on this?
  • What behavior does it enable/prevent?
  • Who benefits from its existence?
  • What breaks if removed?

Example: API clients rely on validation errors for UX feedback. Removing validation breaks client error handling.

5. Design Safe Reform

If removal is justified, plan how to do it without causing harm.

Options:

  • Remove gradually (feature flag, phased rollout)
  • Replace with better alternative (validation → type safety)
  • Document removal rationale (prevent re-adding)
  • Create escape hatch (easy rollback if wrong)

Example: Add type safety at API boundary, deprecate old validation with 6-month timeline, monitor error rates.

6. Execute with Observation

Remove the fence while watching for unintended consequences.

Monitor: Error rates, user complaints, system behavior, performance metrics

Rollback triggers: Errors spike >2x, critical functionality breaks, undocumented dependencies surface

Example: Remove old validation, errors spike 3x in first week, investigation reveals clients parse error messages—restore temporarily while fixing clients.

Example Application

Situation: Engineering team inherits legacy monolith with unusual database transaction pattern—every write is wrapped in explicit BEGIN/COMMIT despite framework auto-handling transactions.

Naive Approach: "Framework handles transactions automatically—this manual wrapping is technical debt. Delete it."

Chesterton's Fence Applied:

  1. Identify: Manual transaction wrapping seems redundant
  2. Investigate: Git blame → Added 2018 by senior engineer who left
  3. Context: Comments mention "phantom reads under high concurrency"
  4. Dependencies: Load testing reveals race conditions without explicit isolation level
  5. Design: Keep pattern, document WHY (prevents phantom reads), add tests
  6. Result: Avoided breaking production under load

Outcome: What seemed like technical debt was actually a critical concurrency fix. Without Chesterton's Fence, team would have deployed a race condition to production.

Anti-Patterns

  • Assuming old = bad: Age doesn't imply obsolescence—time-tested may be robust (see: Lindy Effect)
  • "Nobody knows why it's here": Lack of documentation doesn't mean lack of purpose
  • Skipping research due to confidence: The more obvious the fix seems, the more dangerous to skip investigation
  • Analysis paralysis: Spending months researching a trivial fence—balance investigation cost vs. risk
  • Reformer's burden reversed: Making defenders prove the fence's value instead of understanding it yourself

Related Frameworks

  • second-order-thinking (anticipate consequences)
  • lindy-effect (older = more likely to endure)
  • systems-thinking (understanding interconnections)
  • via-negativa (removal requires more care than addition)
  • schelling-fence (maintaining bright lines)