22description: git-commits: Git commit message standards and AI assistance
33globs: git-commits: Git commit message standards and AI assistance | *.git/* .gitignore .github/* CHANGELOG.md CHANGES.md
44---
5- # Git Commit Standards
5+ # Optimized  Git Commit Standards
66
7- ## Format
7+ ## Commit Message  Format
88```
9- type(scope[component ]): concise  description
9+ Component/File(commit-type[Subcomponent/method ]): Concise  description
1010
11- why: explanation  of necessity/ impact
12- what:  
13- - technical changes made
14- - keep focused on  single topic
11+ why: Explanation  of necessity or  impact. 
12+ what:
13+ - Specific  technical changes made
14+ - Focused on a  single topic
1515
16- refs: #issue-number, breaking changes, links
16+ refs: #issue-number, breaking changes, or relevant  links
1717```
1818
19- ## Commit Types
20- - `feat`: New features/enhancements
21- - `fix`: Bug fixes
22- - `refactor`: Code restructuring
23- - `docs`: Documentation changes
24- - `chore`: Maintenance tasks (deps, tooling)
25- - `test`: Test-related changes
26- - `style`: Code style/formatting
27- 
28- ## Guidelines
29- - Subject line: max 50 chars
30- - Body lines: max 72 chars
31- - Use imperative mood ("Add" not "Added")
32- - Single topic per commit
33- - Blank line between subject and body
34- - Mark breaking changes with "BREAKING:"
35- - Use "See also:" for external links
36- 
37- ## AI Assistance in Cursor
38- - Stage changes with `git add`
39- - Use `@commit` to generate initial message
40- - Review and adjust the generated message
41- - Ensure it follows format above
42- 
43- ## Examples
44- 
45- Good commit:
19+ ## Component Patterns
20+ ### General Code Changes
21+ ```
22+ Component/File(feat[method]): Add feature
23+ Component/File(fix[method]): Fix bug
24+ Component/File(refactor[method]): Code restructure
4625```
47- feat(subprocess[run]): Switch to unicode-only text handling
4826
49- why: Improve consistency  and type safety in subprocess handling 
50- what: 
51- - BREAKING: Changed run() to use text=True by default 
52- - Removed console_to_str() helper and encoding logic 
53- - Simplified output handling 
54- - Updated type hints for better safety 
27+ ### Packages  and Dependencies 
28+ | Language   | Standard Packages                  | Dev Packages                  | Extras / Sub-packages                          | 
29+ |------------|------------------------------------|-------------------------------|-----------------------------------------------| 
30+ | General    | `lang(deps):`                      | `lang(deps[dev]):`            |                                               | 
31+ | Python     | `py(deps):`                        | `py(deps[dev]):`              | `py(deps[extra]):`                            | 
32+ | JavaScript | `js(deps):`                        | `js(deps[dev]):`              | `js(deps[subpackage]):`, `js(deps[dev{subpackage}]):` | 
5533
56- refs: #485
57- See also: https://docs.python.org/3/library/subprocess.html
34+ #### Examples
35+ - `py(deps[dev]): Update pytest to v8.1`
36+ - `js(deps[ui-components]): Upgrade Button component package`
37+ - `js(deps[dev{linting}]): Add ESLint plugin`
38+ 
39+ ### Documentation Changes
40+ Prefix with `docs:`
41+ ```
42+ docs(Component/File[Subcomponent/method]): Update API usage guide
5843```
5944
60- Bad commit:
45+ ### Test Changes
46+ Prefix with `tests:`
6147```
62- updated some stuff and fixed bugs 
48+ tests(Component/File[Subcomponent/method]): Add edge case tests 
6349```
6450
65- Cursor Rules: Add development QA and git commit standards (#cursor-rules)
51+ ## Commit Types Summary
52+ - **feat**: New features or enhancements
53+ - **fix**: Bug fixes
54+ - **refactor**: Code restructuring without functional change
55+ - **docs**: Documentation updates
56+ - **chore**: Maintenance (dependencies, tooling, config)
57+ - **test**: Test-related updates
58+ - **style**: Code style and formatting
59+ 
60+ ## General Guidelines
61+ - Subject line: Maximum 50 characters
62+ - Body lines: Maximum 72 characters
63+ - Use imperative mood (e.g., "Add", "Fix", not "Added", "Fixed")
64+ - Limit to one topic per commit
65+ - Separate subject from body with a blank line
66+ - Mark breaking changes clearly: `BREAKING:`
67+ - Use `See also:` to provide external references
68+ 
69+ ## AI Assistance Workflow in Cursor
70+ - Stage changes with `git add`
71+ - Use `@commit` to generate initial commit message
72+ - Review and refine generated message
73+ - Ensure adherence to these standards
74+ 
75+ ## Good Commit Example
76+ ```
77+ Pane(feat[capture_pane]): Add screenshot capture support
6678
67- - Add dev-loop.mdc: QA process for code edits 
68-   - Type checking with mypy 
69-   - Linting  with ruff 
70-   - Test validation with pytest 
71-   - Ensures edits are validated before commits 
79+ why: Provide visual debugging capability 
80+ what: 
81+ - Implement capturePane method  with image export 
82+ - Integrate with existing Pane component logic 
83+ - Document usage in Pane README 
7284
73- - Add git-commits.mdc: Commit message standards
74-   - Structured format with why/what sections
75-   - Defined commit types and guidelines
76-   - Examples of good/bad commits
77-   - AI assistance instructions
85+ refs: #485
86+ See also: https://example.com/docs/pane-capture
87+ ```
7888
79- Note: These rules help maintain code quality and commit history
80- consistency across the project.
89+ ## Bad Commit Example
90+ ```
91+ fixed stuff and improved some functions
92+ ```
8193
82- See also: https://docs.cursor.com/context/rules-for-ai 
94+ These guidelines ensure clear, consistent commit histories, facilitating easier code review and maintenance. 
0 commit comments