Private
Public Access
1.3 KiB
1.3 KiB
From conductor/code_styleguides/python.md §8 "AI-Agent Specific Conventions":
- No diagnostic noise in production code (Added 2026-06-09).
sys.stderr.write(f"[XYZ_DIAG] ...")lines added tosrc/*.pyfor one-time debugging are technical debt the moment they ship. The project's production code should not contain[XYZ_DIAG]markers,print(...debug...)calls, or any other ad-hoc debug instrumentation. The right place for diagnostic output during a one-time investigation istests/artifacts/<test_name>.diag.log(a log file) or a standalone/tmp/diag_<name>.pyscript. If you must instrument a production function for a single test run, the diag lines are part of the same atomic commit as the fix — they do not live uncommitted in the working tree. If you "revert everything," that means the diag lines are also reverted.
From AGENTS.md "No Diagnostic Noise in Production (kill it)":
- Diagnostic stderr goes to a log file (
tests/artifacts/<test_name>.diag.log) or to a temporary diagnostic script (/tmp/diag_rag.py), NOT tosrc/*.py. If you absolutely must instrument a production function for a single test run, the diag lines are part of the same atomic commit as the fix — they do not live uncommitted in the working tree. If you "revert everything," that means the diag lines are also reverted.