# Tooling-only configuration for agami-core (the repo root). # # This root has NO [build-system] table on purpose — it is not itself an installable # package; it's the Claude Code plugin (skills + scripts) plus tooling config. The # importable library lives in its own package at packages/agami-core/, which has its own # pyproject. This file is the single source of truth for ruff + pytest config; # CI (.github/workflows/ci.yml) reads it so the same rules run locally and in the gate. [tool.ruff] line-length = 100 target-version = "py310" src = ["plugins", "packages", "tests"] [tool.ruff.lint] # Calibrated starting set — green day one, ratchet up later. E4/E7/E9 + F are # ruff's defaults (real correctness bugs: undefined names, unused imports, bad syntax); # I sorts imports. Line-length (E501) and naming (N) are deliberately left out for now — # the existing tree has ~1900 long lines; enforce those in a later, dedicated pass. select = ["E4", "E7", "E9", "F", "I"] # Intentional patterns in existing scripts/tests, left for a later cleanup pass rather than # forcing rewrites now: E402 (sys.path tweak before imports), E702 (one-line statements), # E731 (lambda in a test helper), E741 ("l" loop var in a test), F841 (a documented unused var). ignore = ["E402", "E702", "E731", "E741", "F841"] [tool.pytest.ini_options] testpaths = ["tests"] # No --cov in addopts on purpose: a bare `pytest` then works without pytest-cov installed # (IDE runners, quick local runs). The CI gate and `dev.py cover` pass --cov explicitly, and the # --cov-fail-under floor lives only on CI's py3.12 leg (.github/workflows/ci.yml). markers = [ # Applied by the safety corpus's parametrizers, and counted by tests/e2e/conftest.py — both at # collection and again at session end, against a constant per marker. Registered so an unknown-mark # warning can never be the only sign that one was misspelt: the marker is how that run selects its # work, and a typo there is a run that proves nothing. "db_path: a safety-corpus vector driven against the DB-served model and the Postgres warehouse", # Separate from db_path on purpose. It is a separate claim — the database refusing a write with the # application out of the path — and it needs its own count, or one could shrink while the other grew. "role_floor: a write issued straight at Postgres as the read-only role, with no application in the path", # The file-path half — the one that runs on every PR, and the one the counts above said nothing # about. Its own count is what stops a `--deselect` of that single file from exiting 0. "http_path: a safety-corpus vector driven over HTTP against the file-served model", ]