mavis_auditor
Audits code for KOMO antipatterns (muro_de_fuego, zero_bifurcation, mega_function) and returns findings with severity and line numbers. Read-only, for pre-commit and code review.
Instructions
Read-only KOMO antipattern detector. Scans files for: muro_de_fuego (queries to ops_* without ownerId), zero_bifurcation (if/else on categoria), service_no_wire (exported service function — verify window.* wire), mega_function (>200 lines), direct_auth_users (RLS referencing auth.users), jsonb_column_audit (touches JSONB col — cross-check other queries). Returns findings with severity, file, line. Read-only — never modifies the workspace. Use before commits, before refactors, or as a code review assistant.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| glob | No | File pattern. Default: "*.{js,ts,tsx,jsx,mjs,cjs,sql}". | |
| path | No | File or directory to audit. Workspace-relative. Default: "." (whole workspace). | |
| checks | No | Subset of checks to run. Default: all. | |
| max_findings | No | Cap on findings returned. Default: 200. | |
| severity_threshold | No | Minimum severity to report. Default: "info" (all). |