Depends on your stage, but here's what I learned:
I built AgentGuard (AI security SDK) in 3 weeks with "move fast"
mentality. Shipped to npm/PyPI with minimal tests. Got first users.
Then reality hit:
- Bug reports from production
- Can't add features without breaking things
- Spending more time fixing than building
Spent 2 weeks refactoring:
- Added 500+ tests
- Proper TypeScript types
- Clean architecture
Result: 10x faster development now. New features in hours, not days.
My take: Code quality is an investment. Skip it early to validate.
But once you have users, pay the debt fast. The interest compounds
quickly.