General-purpose coding policy for Baruch's AI agents
95
91%
Does it follow best practices?
Impact
96%
1.31xAverage score across 10 eval scenarios
Advisory
Suggest reviewing before use
except Exception: (never except BaseException: — KeyboardInterrupt and SystemExit must be allowed to propagate past this handler so processes stay killable via Ctrl-C / sys.exit()), or the analogous form in other languages — only when all three preconditions hold: the catch line or the comment immediately above it contains the literal grep token outer-boundary-process-contract (mandatory in every language so one tile-wide grep catches every sanctioned instance); AND, where a linter requires a native catch-all suppressor, that suppressor sits on the catch line itself (Python/Ruff: # noqa: BLE001 must be inline with except Exception: — placing it on the comment above does not suppress BLE001); AND a comment immediately above names (a) the caller's silent-failure shape, (b) what the catch emits to satisfy the contract (e.g. stderr traceback + safe-shape JSON on stdout), and (c) why propagation would break the contract; AND the handler sits at the outermost process boundary, never an inner function. Every other catch in the file still uses specific exception types. Reference incident: 2026-04-16 → 2026-04-18 silent outage where an unhandled TypeError in a precheck script caused agent-runner to read the non-zero exit as wake_agent=false (the precheck JSON contract documented in rules/script-delegation.md) and the scheduled task never woke; the carve-out exists so the defensible outer-boundary catch is also defensible to literal-rule reviewers.app init to create one"