{
 "_comment": "Explicit, justified exceptions to the architecture contracts. A set-contract key is the exact violation string; a count-contract key is the file and 'max' is the number of occurrences allowed. Every entry needs a reason; an exception that no longer matches the code fails the test and must be deleted.",
 "exceptions": [
  {"contract": "K5", "key": "InvestmentManager/export_handoff.py", "max": 5,
   "reason": "SSH RPC entry point: it runs outside the WSGI app, so it must load .env itself (via env_loader/dotenv) and read the INVESTMENT_EXPORT_DIAGNOSTICS switch; it is a composition-layer entry, not a service."},
  {"contract": "K5", "key": "tools/dev.py", "max": 1,
   "reason": "Developer CLI entry point (composition layer): it prepares the environment of local tooling and is never imported by the application."},
  {"contract": "K4", "key": "InvestmentManager/routes/dbshell.py", "max": 9,
   "reason": "DB Shell is the master-only administration console of the application databases (behind the unlock password): running SQL on IDB.db and agents.db is its purpose, not domain SQL leaking into a route. It was moved unchanged out of routes/dashboard.py (S4.7 / package 2), where the same 9 calls were counted; the dynamic statements are reviewed in tests/test_dynamic_sql_guard.py."}
 ]
}
