What happened.
The company's product had become something customers depended on. Engineering had been a succession of freelancers and one agency. Each needed direction, and none owned the whole job. The managing director found they were deciding the order of bug fixes, which is not why they started the company.
What we found, and the technical detail
A full engineering team was too much to hire and manage for a company of this size. The managing director wanted engineering run as a service, with one party accountable for it, and with the company keeping the decisions that were theirs.
At the start, we found that the company's engineering work fell into three kinds: urgent fixes, improvements to the product customers use, and upkeep that nobody had scheduled. Each needed a different kind of decision, and those decisions were the part the managing director wanted to keep.
We did not agree to everything at once. We talked first about what engineering needed to cover, and whether it could be bounded and run responsibly. Then we started small, with the AI software engineer on one product, so both sides could see how the work flowed.
Once that worked, we wrote an agreement for the wider scope: what we own, what stays with the company and who approves what. Nothing widened until the managing director had agreed it in writing. Since then we take in requests, order and track them, deliver and verify the changes, and report in writing at an agreed rhythm.
Technical detail. The written agreement states what the arrangement covers and nothing outside it. The company sets the priorities and approves everything the agreement reserves to it. Spending, hiring and contracts are not ours to decide. Everything we produce lives in repositories and tools the company owns. At each periodic review the arrangement is judged against the measures the managing director set, and the company decides to continue, change or stop.