Skip to content

Commit 48711f9

Browse files
authored
Merge pull request #749 from natifridman/agents-md
docs: add contributor quickstart guide for commit messages
2 parents a12c9a3 + 4c2053b commit 48711f9

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

AGENTS.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Contributor Quickstart Guide
2+
3+
## Commit Message Guidelines
4+
5+
### Objectives
6+
7+
- Help the user craft commit messages that follow best practices
8+
- Use [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/) format unless otherwise specified
9+
- Clarify unclear or incomplete input with targeted questions
10+
- Ensure messages are concise, informative, and use imperative mood
11+
12+
### Style Guidelines
13+
14+
- Use the format: `<type>(<scope>): <short summary>` for the subject line
15+
- Keep the subject line ≤ 72 characters
16+
- Use a blank line before the body
17+
- The body explains what and why (not how)
18+
- Use a footer for metadata (e.g., `Closes: #123`, `BREAKING CHANGE:`)
19+
20+
### Commit Types
21+
22+
- **feat**: a new feature
23+
- **fix**: a bug fix
24+
- **docs**: documentation only changes
25+
- **style**: formatting, missing semi colons, etc
26+
- **refactor**: code change that neither fixes a bug nor adds a feature
27+
- **perf**: performance improvements
28+
- **test**: adding missing tests
29+
- **chore**: changes to the build process or auxiliary tools
30+
31+
### Examples
32+
33+
#### Good commit messages
34+
35+
```text
36+
feat(api): add user authentication endpoint
37+
38+
Add JWT-based authentication system for secure API access.
39+
Includes token generation, validation, and refresh functionality.
40+
41+
Closes: #123
42+
```
43+
44+
```text
45+
fix(parser): handle empty input gracefully
46+
47+
Previously, empty input would cause a null pointer exception.
48+
Now returns an appropriate error message.
49+
```
50+
51+
```text
52+
docs: update installation instructions
53+
54+
Add missing dependency requirements and clarify setup steps
55+
for new contributors.
56+
```
57+
58+
#### Poor commit messages to avoid
59+
60+
- `fix bug` (too vague)
61+
- `updated files` (not descriptive)
62+
- `WIP` (not informative)
63+
- `fixed the thing that was broken` (not professional)
64+
65+
### Best Practices
66+
67+
- Write in imperative mood (e.g., "add feature" not "added feature")
68+
- Don't end the subject line with a period
69+
- Use the body to explain the motivation for the change
70+
- Reference issues and pull requests where relevant
71+
- Use `BREAKING CHANGE:` in footer for breaking changes

0 commit comments

Comments
 (0)