Skip to main content
Kiran Brahma
All writing

O9X Build Log 17: Catching Compliance Bombs During Planning

Published Part 17 of O9X Build Logs Personal Essays

I am building O9X to manage over 1,000 associates in a low-margin, compliance-heavy business. In this space, coding fast without mapping operations first is a liability. One automated error in payroll creates a legal violation that compounds every month.

Before writing code, I spent 11 weeks mapping our operations and brought in a labour compliance consultant to test the payroll formulas. If my ERP copies an illegal clause from a client contract, my company still carries the liability. The only question that mattered was whether each formula followed the law.

The first gap we caught was variable overtime under-contribution. Our contracts follow pass-through logic, where we skip a compliance line item if the client refuses to pay for it. One or two clients a month exclude ESIC from overtime wages, and my draft O9X formula copied that exclusion.

Under the Employees' State Insurance Act, a 4% contribution applies to all wages, including variable overtime, split between 3.two5% from the employer and 0.75% from the employee. For 10 employees who worked variable overtime in Q4 2025, that gap caused a direct under-contribution. I updated O9X to enforce a law-first calculation, added ESIC deductions on overtime in payroll, and changed our pricing tool to bill overtime ESIC on actual.

The second gap was eligibility based on gross pay instead of base pay. Some client contracts set ESIC eligibility at Rs 22,000 gross, which sits above the Rs 21,000 statutory threshold, so they excluded those guards. If a guard's base pay is Rs 18,000, they remain eligible even when overtime pushes their take-home pay to Rs 30,000.

We found this mismatch in 2 out of 18 contracts and moved those guards to the right plan. Because those contracts renew in April 2026, we could not trigger a mid-term client audit. We reduced the guards' additional pay by 3.25% to cover the employer share, and they accepted the change in exchange for state medical benefits.

Without that 11-week mapping phase, O9X would have shipped clean code running illegal logic. The overtime shortfall would have stayed hidden until a government audit brought heavy fines. The contract mismatch would have sat untouched until the April 2026 renewal, when fixing it causes real disruption.

I now enforce two hard rules for every module I build. First, the law is the primary key and the client contract is secondary, so any conflict triggers a compliance flag. Second, I do not build a module until I document the worst-case audit scenario.

I still need to run a manual calculation on Q4 2025 to find our exact rupee liability across every gap we found. I also have to audit our remaining contracts before they renew, and I have not yet measured the exact time saved against the longer planning phase. Fast iteration works for consumer apps, yet in compliance-heavy operations it only automates mistakes faster than I can catch them.