You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Type Hints: Required on ALL function signatures
and class members. Enforce strictly with mypy.
Avoid using # type: ignore comments to suppress
mypy errors; fix the underlying type issues instead.
Docstrings: Google-style format for all public APIs.
Logging: Use logging module only; never print().
Relative Paths: Never use absolute paths in code.
Dependency & Configuration Management
Adding/Removing Dependencies: Use uv add /
uv remove commands.
Editing pyproject.toml: Avoid manual edits during
development. Only update pyproject.toml as the
final change after all work is tested.
Before Major Work: Always run uv sync --dev first.
Testing & Quality
Test Coverage: Every code change requires
corresponding tests in tests/.
Validation Before Commit: Run the full suite:
uv run pytest, uv run ruff check .,
uv run mypy ., uv run pip-audit.
Pre-commit Hooks: Use uv run prek install to
set up Git hooks that automatically run checks.
Operational Constraints
No Interactive Prompts: Mock or bypass any
interactive commands.
Staging & Commit Protocol: When you have completed
work and updated files, stage the changes with
git add and then display a suggested commit message
for the user's review. DO NOT actually commit.
Code Review Mode: Analyze only; record findings
in ./REVIEW.md without making modifications.
File Maintenance
Keep Instructions Current: Update "Tech Stack,"
"Project Structure," and "Workflow Commands" if
pyproject.toml, structure, or core logic changes.
Pre-commit Config: Keep .pre-commit-config.yaml
in sync with CI workflow when test requirements change.
Workflow Commands
uv sync --dev # Install/sync deps
uv run pytest # Run tests
uv run ruff check .# Lint
uv run ruff format .# Auto-format
uv run mypy .# Type check
uv run pip-audit # Security audit
uv run prek install # Install git hooks
uv run prek run --all-files # Run all hooks
uv run hello-world hello # Test CLI