Ledger Scrutiny & Audit Sampling AI
Author: CA Laxmi Poojitha BVNS
Manual ledger scrutiny and audit sampling are repetitive, time-consuming, and inconsistent across auditors. This project automates both — turning hours of manual checking into a fast, repeatable first pass, so the auditor can focus judgement where it matters most.
An audit practice where every ledger entry is screened before a human eye ever reaches it — making scrutiny faster, wider in coverage, and free from fatigue-driven oversight.
Build an accessible, automated ledger-scrutiny and audit-sampling tool that flags anomalies and picks samples systematically — leaving the final judgemental call to the auditor.
The project was built using four components working together: Antigravity for direction and vibe coding, Python and its libraries for implementation, a reusable Skill for repeatability, and parallel threading for speed.
Antigravity was used at the start of the build to set direction for the project: the audit standards to follow, where each standard applies, and the formulas to use for scrutiny and sampling. The AI was used solely to write the code and trigger the Python application — it does not consume or process any data itself. All data ingestion and processing happen entirely within the Python process, running locally.
The entire pipeline was vibe-coded in Python. Rather than issuing a fresh prompt for every run, the process was built to run as a standing Python command: once started, it keeps running in the background, continuously carrying out ledger scrutiny and sampling without needing to be re-prompted each time. This keeps the workflow intact and removes the need for manual intervention between steps.
With multiple ledgers to process, the skill originally ran them one after another in Python, which took a significant amount of time. Parallel threading was introduced so that all ledgers run simultaneously in the background, with output released in far less time than the original sequential run.
AI's role in the pipeline is deliberately narrow and clearly bounded from the rest of the process:
This separation keeps the sensitive, data-heavy part of the process — the ledger analysis itself — entirely local, with AI used only for a narrow, non-sensitive drafting task.
In line with the Digital Personal Data Protection (DPDP) Act, no financial data is sent to any external system. All ledger data, materiality computations, and scrutiny/sampling logic are processed locally through Python; only the company-description search touches an external AI service, and that step does not involve financial data.
The current build automates ledger scrutiny and audit sampling on a systematic, rule-driven basis — it is not yet judgemental. The tool flags anomalies and selects samples consistently and at speed, but the final judgemental call on any flagged item remains with the auditor. Extending the system toward judgemental assessment is identified as a future direction for the project.
The core output of the pipeline is two-fold: a Trial Balance reconciliation and a sub-ledger (ledger-wise) reconciliation, followed by a fully worked audit sampling pack built on top of that reconciled base. The example below is an actual run of the tool, on a real engagement, shown to demonstrate the output in full.
This is the live run demonstrated at the hackathon, shown here in two phases — the engagement initially halting for lack of data, and then completing once the required ledgers were supplied — to demonstrate both the output and the resumability of the tool in a single real case.
Varnika Foods & Beverages Limited is a Bengaluru-based FMCG manufacturer (snacks, juices, dairy drinks) with ₹21.23 Cr revenue and ₹2.86 Cr Profit Before Tax for FY 2025-26. At the start of the engagement, only the Financial Statements and Trial Balance had been provided by the client — no general ledgers.
This halt is not a failure state — it is the tool correctly refusing to sample without primary records, and handing back a precise, ready-to-send data request instead.
Once the client supplied the demanded ledgers, the engagement was resumed with a single command rather than restarted — the tool picked up exactly from the checkpoint where Phase A had stopped.
Outcome: evaluated misstatement of ₹0.00, at or below Performance Materiality — supporting an unmodified audit opinion.
The Varnika Foods run above is a direct demonstration of this: when only financial statements and a trial balance are available, the tool completes everything that can honestly be done at that stage — reconciliation and materiality calibration — and then stops cleanly at the point requiring primary ledgers, rather than guessing. It records exactly what has been processed and what remains in a markdown-based tracker and checkpoint file. When the client supplies the outstanding ledgers — in full or in part — the engagement resumes from that exact checkpoint with a single command. Nothing already reconciled or calibrated is redone, and if only part of the data arrives, the tool processes that batch, updates the outstanding schedule, and pauses again until the rest follows.
Because the underlying logic is built around general auditing standards (SA 320, SA 530, SA 240, SA 500, SA 330, SA 700, among others) rather than one company or one industry, the same model is reusable across different types of audits. Varnika Foods (FMCG manufacturing) and the methodology's use on other entities in earlier runs show the pipeline is not specific to one sector — it applies wherever a trial balance and ledger-level data are available, whatever stage that data arrives in.
| Component | Role in the Project |
| Antigravity | Sets direction: standards, their scope, and formulas |
| Vibe Coding (Python) | Builds and runs the pipeline continuously in the background |
| Skill (skill.md) | Packages the scrutiny & sampling logic as a reusable, triggerable command |
| Parallel Threading | Runs multiple ledgers simultaneously, cutting processing time |
| AI | Searches for the company description. |
| Local Processing | Materiality model choice, Overall/Performance Materiality, full scrutiny & sampling logic — DPDP-compliant |
| Output | Trial balance & ledger reconciliation, materiality workings, stratified sampling, Excel workpaper and HTML dashboard |
| Resumability | MD trackers & a checkpoint file let a run resume exactly where it stopped. |