diff --git a/.cursor/rules/docs.mdc b/.cursor/rules/docs.mdc new file mode 100644 index 0000000..c4a849e --- /dev/null +++ b/.cursor/rules/docs.mdc @@ -0,0 +1,13 @@ +--- +description: "Documentation conventions" +globs: + - "docs/**/*.md" + - "mkdocs.yaml" +alwaysApply: false +--- + +# Documentation Rules +- Write docs in Markdown with clear headings and code examples. +- Update `mkdocs.yaml` navigation when adding new docs. +- Keep `README.md` concise, and move long explanations to `/docs`. +- Use Python code fences (```python … ```) in examples. diff --git a/.cursor/rules/pydantic-usage.mdc b/.cursor/rules/pydantic-usage.mdc new file mode 100644 index 0000000..8e89a27 --- /dev/null +++ b/.cursor/rules/pydantic-usage.mdc @@ -0,0 +1,13 @@ +--- +description: "Conventions for using Pydantic models and settings" +globs: + - "**/*.py" +alwaysApply: false +--- + +# Pydantic Rules +- Use `pydantic.BaseModel` for request/response schemas. +- For configuration, use `pydantic_settings.BaseSettings` (v2). +- Always provide default values or use `...` for required fields. +- Use model validators (`@field_validator`, `@model_validator`) instead of custom init logic. +- Keep models small and focused on one purpose. diff --git a/.cursor/rules/python-run.mdc b/.cursor/rules/python-run.mdc new file mode 100644 index 0000000..035c5e1 --- /dev/null +++ b/.cursor/rules/python-run.mdc @@ -0,0 +1,12 @@ +--- +description: "Use `uv run` for running Python code instead of raw python3" +globs: + - "**/*.py" +alwaysApply: true +--- + +# Running Python code +- **Do not** run `python3 -c` directly. +- Always invoke Python code using `uv run python