|
27 | 27 | - **Naming**: `snake_case` functions/variables, `PascalCase` classes |
28 | 28 | - **No mocking**: Tests use real API calls |
29 | 29 | - **Client creation**: Always use `instructor.from_provider("provider_name/model_name")` instead of provider-specific methods like `from_openai()`, `from_anthropic()`, etc. |
| 30 | + |
| 31 | +## Pull Request (PR) Formatting |
| 32 | + |
| 33 | +Use **Conventional Commits** formatting for PR titles. Treat the PR title as the message we would use for a squash merge commit. |
| 34 | + |
| 35 | +### PR Title Format |
| 36 | + |
| 37 | +Use: |
| 38 | + |
| 39 | +`<type>(<scope>): <short summary>` |
| 40 | + |
| 41 | +Rules: |
| 42 | +- Keep it under ~70 characters when you can. |
| 43 | +- Use the imperative mood (for example, “add”, “fix”, “update”). |
| 44 | +- Do not end with a period. |
| 45 | +- If it includes a breaking change, add `!` after the type or scope (for example, `feat(api)!:`). |
| 46 | + |
| 47 | +Good examples: |
| 48 | +- `fix(openai): handle empty tool_calls in streaming` |
| 49 | +- `feat(retry): add backoff for JSON parse failures` |
| 50 | +- `docs(agents): add conventional commit PR title guidelines` |
| 51 | +- `test(schema): cover nested union edge cases` |
| 52 | +- `ci(ruff): enforce formatting in pre-commit` |
| 53 | + |
| 54 | +Common types: |
| 55 | +- `feat`: new feature |
| 56 | +- `fix`: bug fix |
| 57 | +- `docs`: documentation-only changes |
| 58 | +- `refactor`: code change that is not a fix or feature |
| 59 | +- `perf`: performance improvement |
| 60 | +- `test`: add or update tests |
| 61 | +- `build`: build system or dependency changes |
| 62 | +- `ci`: CI pipeline changes |
| 63 | +- `chore`: maintenance work |
| 64 | + |
| 65 | +Suggested scopes (pick the closest match): |
| 66 | +- Providers: `openai`, `anthropic`, `gemini`, `vertexai`, `bedrock`, `mistral`, `groq`, `writer` |
| 67 | +- Core: `core`, `patch`, `process_response`, `function_calls`, `retry`, `dsl` |
| 68 | +- Repo: `docs`, `examples`, `tests`, `ci`, `build` |
| 69 | + |
| 70 | +### PR Description Guidelines |
| 71 | + |
| 72 | +Keep PR descriptions short and easy to review: |
| 73 | +- **What**: What changed, in 1–3 sentences. |
| 74 | +- **Why**: Why this change is needed (link issues when possible). |
| 75 | +- **Changes**: 3–7 bullet points with the main edits. |
| 76 | +- **Testing**: What you ran (or why you did not run anything). |
| 77 | + |
| 78 | +If the PR was authored by Cursor, include: |
| 79 | +- `This PR was written by [Cursor](https://cursor.com)` |
0 commit comments