# Equicord Rules ## Philosophy - Solve problem at hand. No refactors unless asked. - Smallest diff wins. Three similar lines beat premature helper. - Less code with same behavior always wins. Equivalent solutions: shorter one ships. Compression is intelligence. - Don't over-guard. Check only conditions that can actually occur. `if (user)` on non-optional store return is wrong. `try/catch` on code that can't throw is wrong. `?.` on type-guaranteed values is wrong. Dead defensive code isn't safety. - No comments unless asked. Keep existing ones, they carry context. - Delete dead code. Don't comment out. - Natural human text in errors, descriptions, toasts. No dashes, no robotic phrasing. Descriptions start capitalized, end with period. - One-file plugin default. Split only past ~250 lines or when second file is genuinely reusable (`utils.ts`, `settings.ts`, `components/`). - No abstraction for 1-2 call sites. Inline beats single-use hook. `createX` used once is just a function call. - Don't reimplement what `@webpack/common` or `@utils/*` exports. Search first. - Don't cache Discord data. Stores are source of truth, read on demand. Cache only what isn't in a store. - Don't manage state Discord manages. `useStateFromStores` over `useState` + flux that mirrors a store. - Don't recreate Discord components. Reuse `Button`, `TextInput`, `Tooltip`, `Menu.*`, etc. Hand-rolled `