Private
Public Access
feat(directives): add 15 engagement-specific directives + tags.toml entries
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
# scripts_audit_pattern
|
||||
|
||||
## v1
|
||||
|
||||
**Why this iteration:** New rule, no prior source. Encodes the existing audit-script conventions as a directive so new audit scripts follow the same shape.
|
||||
**Source:** new rule (pattern inferred from existing `scripts/audit_*.py`)
|
||||
|
||||
---
|
||||
**Lifted:** 2026-07-05
|
||||
@@ -0,0 +1,19 @@
|
||||
# New audit scripts follow the `audit_<thing>.py` naming + `--json` + `--strict` pattern of the existing 4
|
||||
|
||||
## What it says
|
||||
|
||||
A new audit script MUST:
|
||||
1. Be named `scripts/audit_<thing>.py` (not `check_<thing>.py`, not `lint_<thing>.py`).
|
||||
2. Have a `--help` that explains what it checks and how to fix violations.
|
||||
3. Have a `--json` mode for CI integration (machine-readable output).
|
||||
4. Have a default informational mode (exits 0; prints human-readable report).
|
||||
5. Have a `--strict` mode (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 `--strict` gate rule
|
||||
- `conductor/directives/convention_enforcement_4_mechanisms` — the 4-mechanism model
|
||||
Reference in New Issue
Block a user