diff --git a/.claude/rules/docs.md b/.claude/rules/docs.md new file mode 100644 index 0000000..7ff2e36 --- /dev/null +++ b/.claude/rules/docs.md @@ -0,0 +1,12 @@ +--- +paths: + - "docs/**" + - "mkdocs.yml" +--- + +# Documentation Rules + +- Write docs in Markdown with clear headings and code examples. +- Update `mkdocs.yml` 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/.claude/rules/git-workflow.md b/.claude/rules/git-workflow.md new file mode 100644 index 0000000..9edcf9b --- /dev/null +++ b/.claude/rules/git-workflow.md @@ -0,0 +1,6 @@ +# Git Workflow + +- Do not call `git commit`. +- Staging and inspection commands (`git status`, `git diff`, `git log`) are fine. +- Prefix commits with `uv run` so pre-commit hooks use the correct environment, e.g. + `uv run git commit -m "message"`. diff --git a/.claude/rules/pydantic-usage.md b/.claude/rules/pydantic-usage.md new file mode 100644 index 0000000..7da8b01 --- /dev/null +++ b/.claude/rules/pydantic-usage.md @@ -0,0 +1,12 @@ +--- +paths: + - "**/*.py" +--- + +# 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/.claude/rules/python-run.md b/.claude/rules/python-run.md new file mode 100644 index 0000000..b42b264 --- /dev/null +++ b/.claude/rules/python-run.md @@ -0,0 +1,13 @@ +--- +paths: + - "**/*.py" + - "run/**" +--- + +# Running Python code + +- **Do not** run `python3 -c` directly. +- Always invoke Python code using `uv run python