Logic that lives in three places and is written in none
GRADOS has administered payroll for private schools and universities in Argentina since 1993.
When they take on a new client, they inherit a payroll system whose logic exists nowhere in writing. Part of it lives in government decrees. Part in a legacy system's configuration. Part in the heads of people who have done the job for thirty years.
Their founder put it precisely: payroll sits at the intersection of legal rules, operational implementation and final results, and those three layers are almost never documented together.
So onboarding means a person reverse-engineering salary logic by hand, from receipts, one concept code at a time. The question was whether AI could do that reconstruction, and whether the reconstruction could be proven correct.
A pipeline from receipt PDFs to a written policy document
Extract
Parse receipts out of multi-hundred-page PDFs. Handle multiple positions per employee, teaching and non-teaching classifications, seniority tiers, permanent versus substitute status, and Argentine number formatting where a comma is the decimal separator.
Infer
Detect which concept codes behave as functions of which inputs. Separate behavioural subgroups that follow different rules from those that look similar on the surface.
Verify
Test every candidate formula against every receipt it should explain, and report where it holds and where it doesn't.
Document
Generate a policy document a human can read, check and hand to the next person.
Verified against known answers
Two independent K-12 schools, September 2025 payroll, where official government rules existed and served as an answer key.
| Formula | Result |
|---|---|
| Estado Docente | 80 / 80 |
| Actividad Específica | 80 / 80 |
| Función Docente | 80 / 80 |
| Material Didáctico | 86 / 86 |
| Seniority, non-teaching | 32 / 32 |
| Seniority, teaching | 102 / 105 |
Maximum error on the exact matches: 0.0003%. That is sub-cent rounding, across two schools never compared to each other during development.
Extraction reliability
203 receipts from 208 pages. Zero validation errors.
Speed
71 employees, 79 receipts, to a finished policy document in 154 seconds. Work that took a person days.
At scale
The same method was applied to a university payroll with around 1,400 employees, 404 receipt pages and more than 80 distinct concept codes, under a completely different code system, with no official documentation of any kind.
That analysis mapped the structure of a payroll nobody had documentation for. It is exactly the scenario GRADOS faces on every onboarding, at the largest scale they encounter.
The verified figures come from cases where the answer was already known. That is the point. You cannot trust a reconstruction method you have never tested against a known answer. Prove it where the answer exists, then apply it where it doesn't. The university work is large-scale structural analysis, not a second verification set, and it is described that way deliberately.
If the rules produce documents, the rules can be recovered
Any business where the operating rules are real, consistently applied and undocumented:
Pricing logic that grew by exception over fifteen years
Commission structures nobody can fully explain
Legacy system behaviour where the original developer is gone
Regulatory calculations that have to be reproduced and defended
Have rules nobody wrote down?
That's the problem I'm best at. Start with a diagnostic and find out what's recoverable.