Skip to content

Commit fcbcefa

Browse files
committed
docs(contributing): add Cursor contribution rules
Add always-on and docs-scoped Cursor rules to keep commit/PR wording and contributing documentation aligned with project policy from docs/contributing/overview.md. Allow these rule files in .gitignore so they are tracked in the repo.
1 parent e5bf1db commit fcbcefa

3 files changed

Lines changed: 43 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
description: Commit and pull request conventions for Tracee contributors
3+
alwaysApply: true
4+
---
5+
6+
# Commit and PR Conventions
7+
8+
When preparing commits or PR text in this repository, follow these rules from `docs/contributing/overview.md`:
9+
10+
- Use Conventional Commits: `type(optional scope): description`.
11+
- Allowed types: `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`, `revert`.
12+
- Write subject in imperative mood and keep it at 50 chars max.
13+
- Optional body explains **why**, not **how**; wrap at 72 chars.
14+
- Breaking changes must use `!` in subject and include a `BREAKING CHANGE:` footer.
15+
- Keep code details in commit message; keep review/process details in PR description.
16+
- For cross-area work, suggest splitting into self-contained commits when possible.
17+
- Remind contributors that commits must be signed (GPG/SSH/S/MIME).
18+
19+
## Examples
20+
21+
- `fix(ebpf): handle map resize race`
22+
- `docs(contributing): clarify commit signing requirement`
23+
- `feat(cli)!: remove deprecated --cache flag`
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
description: Contributing docs style and policy alignment
3+
globs:
4+
- "docs/contributing/**/*.md"
5+
alwaysApply: false
6+
---
7+
8+
# Contributing Docs Rule
9+
10+
When editing `docs/contributing/**`:
11+
12+
- Keep policy text aligned with `docs/contributing/overview.md`.
13+
- Use normative language consistently (`must`, `should`, `may`).
14+
- Keep guidance actionable and concise; avoid duplicating nearby docs.
15+
- For commit guidance, match Conventional Commits and signed-commit rules from `overview.md`.
16+
- If policy changes (not just wording), update all affected contributing docs in the same PR.
17+
- Include examples for non-obvious rules (for example `BREAKING CHANGE` footer usage).
18+
- Prefer canonical external references (GitHub signing docs, Conventional Commits spec).

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,5 @@ release_notes.txt
5050
.cursor/rules/**
5151
!.cursor/rules/shell-style-guide.mdc
5252
!.cursor/rules/testing-guide.mdc
53+
!.cursor/rules/commit-pr-conventions.mdc
54+
!.cursor/rules/contributing-docs.mdc

0 commit comments

Comments
 (0)