Skip to content

Commit c8e2dcb

Browse files
committed
docs(claude): strengthen backward compatibility prohibition
- Upgrade section from IMPORTANT to CRITICAL - Add explicit requirement to actively remove backward compat code - Add examples of forbidden patterns (env vars, feature flags, etc.) - Make it clear: just delete unused code completely
1 parent 1324f0f commit c8e2dcb

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

CLAUDE.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,20 @@ import colors from 'yoctocolors-cjs'
9494
- **FORBIDDEN ES2023+**: `toReversed()`, `toSorted()`, `toSpliced()`, `with()`
9595
- **Use instead**: `slice().reverse()`, `slice().sort()`
9696

97-
### Backward Compatibility (IMPORTANT)
98-
- **NO BACKWARD COMPATIBILITY**: Don't maintain it - we're our only consumers
99-
- **Breaking changes**: Inform about them, but don't add compat layers
97+
### Backward Compatibility (CRITICAL)
98+
- **🚨 NO BACKWARD COMPATIBILITY**: FORBIDDEN to maintain it - we're our only consumers
99+
- **Active removal**: MUST remove existing backward compatibility code when encountered
100+
- **Breaking changes**: Inform about them, but NEVER add compat layers
100101
- **Dead code**: Backward compat code becomes dead code in our ecosystem
101102
- **Clean breaks**: Make clean API changes without deprecation paths
102103
- **Migration**: Quick internal updates preferred over gradual deprecation
104+
- **Examples of forbidden patterns**:
105+
- ❌ Renaming unused `_vars` instead of deleting
106+
- ❌ Re-exporting types for "compatibility"
107+
- ❌ Adding `// removed` comments for removed code
108+
- ❌ Environment variables for legacy behavior
109+
- ❌ Feature flags for old implementations
110+
- ✅ Just delete unused code completely
103111

104112
### Safe File Operations (SECURITY CRITICAL)
105113
- **Use safeDelete**: Import from `@socketsecurity/lib/fs`

0 commit comments

Comments
 (0)