A contracting firm watched me do most of my work with AI, and asked me a question: could it do theirs?
Their work is not software. The firm builds government works in Delhi: roads, buildings, repairs, the ordinary works that get tendered, built and billed. The billing is done by hand, in Excel, one sheet at a time, the same way it has been done for years. They asked whether it could be automated, and I said let's try.
That was the first week of July 2026. This series is what the three months after that held, including the parts that had nothing to do with code.
What an RA Bill really is
If you have never seen a government works bill, the word "bill" is misleading. It is not an invoice. It is a small book.
When a contractor finishes a stage of work, he files a Running Account bill, an RA Bill, to get paid for what he has done so far. That bill has many sheets, and they are all linked to each other:
- The Schedule of Work. Every item of work, its code from the rate book, its quantity, its rate and its amount.
- The Measurement sheet. How each quantity was worked out, from the length, breadth and depth measured on site.
- The Abstract. The summary the department reads first, with the recoveries and the net payable.
- The Cement Statement. How much cement the work should have used, item by item, so the department can check it against what it issued.
- The Deviation Statement. The agreement amount next to what was actually done, item by item, at the same rate, so the department can see every extra and every saving.
- The Recovery Statement. Security deposit, income tax, labour cess and anything else being deducted.
- The AE's and EE's Test Check Statements. Two sheets recording that the Assistant Engineer test checked 100% of the measurements and the Executive Engineer more than 50%.
- The Part Rate Statement. Work that is built but not finished, paid at a lower rate now with the balance held back until it is.
- The Completion Certificate.
Every rate on that bill has to match the CPWD Delhi Schedule of Rates, the DSR, to the paise. Not roughly, to the paise. And it has to be the rate printed on the right page of the right volume of the right edition.
The calculation chain
On top of the rates sits a calculation chain that changes from tender to tender:
- a correction factor, often 0.973 in DUSIB, which may apply to the total or to each item's rate, and the two give different answers because of rounding
- a cost index, a percentage the department publishes to bring a book rate up to today
- market rate items, which are priced at par and take neither the factor nor the index
- recoveries, which are deductions
- and last, the quoted percentage, how far above or below the estimate this contractor won the tender
Get the chain right and you have the Work Outlay, the number the contractor actually gets paid.
Why a bill comes back
The bill goes to the Junior Engineer, then the Assistant Engineer. If one rate does not match the book, if one quantity is rounded where it should not be, or if one serial number has been renumbered so it no longer lines up with the department's own copy of the BOQ, the bill comes back.
That is 30 to 60 days of payment held, on lakhs of rupees, for work that is already finished.
The contractor has already paid for the materials and the wages, and is waiting to be repaid. A returned bill is not a small trouble, it is a cash flow problem.
Nobody in this chain is careless. The bill is built by hand, from the last bill, under time pressure, out of a printed book with thousands of items in it. The mistakes come from the process, not the people.
That is the problem.
The first version, one desktop app
The first version was not a startup. It was a tool for one firm.
It was an Electron shell around a Vite frontend and an Express backend, and all of it ran on one computer. Each tender was a folder on disk. There was no login, because there was one user, and no database, because a JSON file was enough.
The firm used it. I watched what broke and fixed it, and then they used it again. By 18 July it was version 1.8.0, and it was making bills that the department passed.
That version is now frozen on purpose and kept as the reference. Every calculation the new system does is tested against what 1.8.0 produced, because 1.8.0 is the version with passed bills behind it.
Then the question changed. If it works for one firm, why would it not work for every firm?