Skip to content

Commit 3fe0c76

Browse files
jxnlcursoragent
andauthored
Pr formatting guidelines (#2015)
Co-authored-by: Cursor Agent <[email protected]>
1 parent 96ca9fe commit 3fe0c76

File tree

2 files changed

+95
-0
lines changed

2 files changed

+95
-0
lines changed

AGENT.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,53 @@
2727
- **Naming**: `snake_case` functions/variables, `PascalCase` classes
2828
- **No mocking**: Tests use real API calls
2929
- **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)`

docs/AGENT.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,51 @@ description: Internal guide for maintaining and improving Instructor documentati
2525
- **Provider docs**: Follow `templates/` patterns
2626
- **Navigation**: Update `mkdocs.yml` for new pages
2727

28+
## Pull Request (PR) Formatting
29+
30+
Use **Conventional Commits** formatting for PR titles so they are consistent and easy to scan. Treat the PR title as the message we would use for a squash merge commit.
31+
32+
### PR Title Format
33+
34+
Use:
35+
36+
`<type>(<scope>): <short summary>`
37+
38+
Rules:
39+
- Keep it under ~70 characters when you can.
40+
- Use the imperative mood (for example, “add”, “fix”, “update”).
41+
- Do not end with a period.
42+
- If it includes a breaking change, add `!` after the type or scope (for example, `feat(docs)!:`).
43+
44+
Good examples:
45+
- `docs(agents): add conventional commit PR title guidelines`
46+
- `docs(mkdocs): fix broken link in validation tutorial`
47+
- `docs(examples): update youtube clips snippet`
48+
- `chore(docs): refresh docs build commands`
49+
50+
Common types:
51+
- `docs`: documentation-only changes
52+
- `fix`: bug fix
53+
- `feat`: new feature
54+
- `test`: add or update tests
55+
- `chore`: maintenance work (build scripts, tooling, repo hygiene)
56+
- `ci`: CI pipeline changes
57+
58+
Suggested docs scopes:
59+
- `docs`, `mkdocs`, `blog`, `examples`, `integrations`, `tutorials`, `agents`
60+
61+
### PR Description Guidelines
62+
63+
Keep PR descriptions short and actionable:
64+
- **What**: What changed, in 1–3 sentences.
65+
- **Why**: Why this change is needed (link issues when possible).
66+
- **Changes**: 3–7 bullet points with the main edits.
67+
- **Testing**: What you ran (or why you did not run anything).
68+
- **Docs impact**: Call out page moves, redirects, or nav updates.
69+
70+
If the PR was authored by Cursor, include:
71+
- `This PR was written by [Cursor](https://cursor.com)`
72+
2873
## Key Files
2974
- `mkdocs.yml` - Site configuration and navigation
3075
- `hooks/` - Custom processing (hide_lines.py removes `# <%hide%>` markers)

0 commit comments

Comments
 (0)