These instructions apply to the whole repository unless a deeper
AGENTS.md overrides them.
- Follow the repo's automated style and lint configuration in
pyproject.tomland.pre-commit-config.yaml. - If an instruction here conflicts with automated tooling, follow the automated tooling.
- Keep Python lines at 79 characters or fewer whenever possible.
- Use
ruff formatstyle. Do not preserve manual formatting that Ruff would rewrite. - Keep imports at module scope whenever possible. Avoid local imports unless they are needed to prevent circular imports, defer expensive dependencies, or avoid optional dependency failures.
- Avoid nested functions whenever possible. Prefer private module-level helpers instead.
- Put public functions before private helper functions whenever practical.
- Name private helper functions with a leading underscore when that fits existing repo conventions.
- pre-commit on changed files is required before finishing; if sandboxed execution fails, request escalation and do not close the task until it has run or the user declines.
- Prefer fixing lint and formatting issues rather than suppressing them.