The audit-engine uses workbooks — AI-generated specifications stored in the audit.workbooks Supabase table — to define what each audit run checks, what data it collects, and what it delivers. One active workbook exists per audit.actions row.
How the Workbook System Works
A row in audit.actions has a schedule (cron string), action_type, and status
When status = 'new', the audit-engine designer.py calls Claude to auto-generate a WorkbookSpec JSON
The spec defines: sections, data connectors to use, thresholds, delivery (email + Drive)
On each scheduled run, scheduler.py dispatches to the appropriate action handler
Results are written to audit.runs; PDF reports go via Mailgun to radieu@gmail.com