Adding one feature to software that already makes money: the six-part contract I write before any code
Most small businesses that hire a developer do not need a new app. They need one step added to software that already works: a kiosk at a counter, a shop admin, a booking flow that pays the rent. The feature itself is usu
Most small businesses that hire a developer do not need a new app. They need one step added to software that already works: a kiosk at a counter, a shop admin, a booking flow that pays the rent. The feature itself is usually the easy part. The expensive part is that the thing already makes money, and every change is a chance to stop it making money.
I have shipped these "one step in the middle" jobs a few times now, and the pattern that keeps them boring is the same every time: I write a contract before I write code. Here are the six parts of it.
1. What gets produced, at what size, in what colour space
Anything that touches images, print or exports is where flows silently break. A photo captured at 3000x2000 in sRGB with a rotation flag, passed through a step that outputs 1500x1000 without that flag, prints cropped and off-colour. Nobody notices on the developer's monitor. The shop notices on the second day.
So the contract starts with a table: input file, output file, resolution, colour space, rotation, DPI, and who owns the conversion. One row per handoff.
2. The state values the old flow already reads
Old software reads state from somewhere: a database row, a folder, a query string, a session id. The new step has to leave that state in exactly the shape the next stage expects, including the values it uses for "done".
If the printing stage branches on status = 'paid' and the new step writes 'PAID', the job disappears from the queue and the customer stands at the counter. So I list every value the next stage branches on and treat each one as an interface.
3. Timeouts, and what happens when one fires
Interactive systems have a clock, and the clock is a feature. A kiosk with a 90-second step needs the time remaining on screen, autosave before the cutoff, and a defined next screen. The timeout path is not an error path; at busy times it is the common path, and it needs its own acceptance test.
4. What "do not touch" means in the repository
"Don't change the existing features" is a wish, not an instruction. The implementation is: the new feature lives in its own module and imports the old code read-only; the build still produces one binary, because the user has to see one program; and a regression checklist runs on every build, all five steps - pay, capture, choose, print, download - even when the change is "just" a button colour.
When the old code cannot be extended in place, the feature becomes a separate process that exchanges files. That works too, but then the file contract from part 1 becomes the whole project and the tests move to the boundary.
5. The samples that decide "good enough"
Quality arguments are the most expensive kind. If the new step involves background removal, upscaling, audio cleanup or print colour, I ask for ten real samples before quoting: bright and dark, long hair and glasses, glossy and matte. The client marks pass or fail on those ten, and that sheet becomes the definition of done. Without it, every later revision is a matter of taste, and taste has no end.
6. Who can fix it at 9pm on a Saturday
The last row of the contract is operational: where the log goes, what it records, and how someone who is not me reads it. A kiosk in an unmanned shop needs a log a staff member can open on a phone. This is also what makes a five-day handover real instead of a zip file with good intentions.
The plan that follows
Week 1: read the old code, write the contract above, list the risks.
Week 2-3: prototype on the real hardware, with a demo to the client in the middle.
Week 4: admin side, timeouts, error handling.
Week 5: repeat the acceptance samples under shop conditions, hand over the code and the checklist.
None of this is a special method. It is what stops a small, well-understood feature from being remembered as the week the shop went down.
If you are sitting on software that already works and need one step added, or an AI-built prototype that has to survive its first real users, the studio page is https://cpcai-studio.web.app/en/ and the address is [email protected]. Tell me what your flow does today, and I will tell you what the contract would look like.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.