1.1 KiB
1.1 KiB
New audit scripts follow the audit_<thing>.py naming + --json + --strict pattern of the existing 4
What it says
A new audit script MUST:
- Be named
scripts/audit_<thing>.py(notcheck_<thing>.py, notlint_<thing>.py). - Have a
--helpthat explains what it checks and how to fix violations. - Have a
--jsonmode for CI integration (machine-readable output). - Have a default informational mode (exits 0; prints human-readable report).
- Have a
--strictmode (exits 1 on any violation; the CI gate).
Why
The 4 existing audit scripts (audit_weak_types.py, audit_exception_handling.py, audit_main_thread_imports.py, audit_no_models_config_io.py) all follow this pattern. A new audit script that breaks the pattern (e.g., named check_foo.py with no --strict) is inconsistent — the CI pipeline will not know how to gate on it, and the user will not know how to run it.
See also
conductor/directives/audit_script_as_gate— the--strictgate ruleconductor/directives/convention_enforcement_4_mechanisms— the 4-mechanism model