serhii.net

In the middle of the desert you can say anything you want

11 Jun 2025

Current cursor user rules

I’ve been using it less than a month so far. BUT this is what I got for now, describes for 95% of my projects. As usual, adding lines when something breaks.

Use docstrings in google format; use python typing. 

Commit messages start the number found in the branch name — so e.g. branch 31-add-address will have commits like "#31 Implement address verification". Use short imperative messages and start with the main/larger change first.

Always use python logging creating a logger = logging.getLogger(__name__) except for mani runner scripts, which name the logger after the  __package__. Unless verbosity/loglevel logic is done in the file, always create that logger right after the imports, in global scope.

Tests are written using pytest, in a directory structure mirroing the src one. Put assets into ./tests/assets/.  Run as `uv run pytest`.

Use pydantic dataclasses for configs/settings and similar structures.

When running CLI commands, expect the shell to be fish, not bash. If you need bash run it explicitly.
Never automatically use --force and similar arguments, ask every time. ESPECIALLY pip's externally-managed-environment error — NEVER run it with --break-system-packages without asking first.

Most projects use uv  — use uv commands for operations (e.g. not `pip install` but `uv add`).
Nel mezzo del deserto posso dire tutto quello che voglio.
comments powered by Disqus