Separation of concerns
Keeping different kinds of decision in different places: what the tax rule is, how it is stored, how it is shown. Then you can think about one, and change one, without reading the others.
Asked to add a field, an agent will happily put reading the input, the business rule and the database code into one function, because that works. The next change to the rule then means reading all of it, and testing it means starting a server.
Say it to your agent
“This route handler does parsing, the discount rule and the SQL. Move the rule to src/pricing.ts as a pure function with no database access, and test it without starting the server.”