2 ms·
The very first thing I do on a Greenfield project or when taking on an existing codebase is implement strict LoC rules in CI/linters. Anything over 800 lines ge
by blairharper 1mo ago
The very first thing I do on a Greenfield project or when taking on an existing codebase is implement strict LoC rules in CI/linters. Anything over 800 lines gets a line freeze.
Anything over 600 lines is considered for a refactor when it's touched if appropriate, anything over 800 lines must be refactored when touched. (Combination of AGENTS.md and custom lint warnings/errors).
Anything over 1000 lines forms the refactoring backlog. This way, the bleeding stops immediately and a lot of debt that would otherwise sit in a refactoring backlog forever gets chipped away at over time. The debt that doesn't get chipped is code that isn't touched often anyway and has been battle tested, so might as well be left alone.