Working on a tool that's grown to ~4000 LOC in one .py file. argparse + 18 subcommands, stdlib + pyyaml only. Tests are in a separate dir.
Single-file has been great for:
- Debugging (one file to grep)
- Distribution (one wheel, no package layout decisions)
- Onboarding contributors
But I'm starting to wonder if it's worth keeping monolithic at this size. What's your threshold for splitting? Is it LOC, or coupling, or "I can't navigate it anymore"?