Skip to content

Commit 7854091

Browse files
committed
AGENTS(ai[rules]): Add git commit standards
why: This repo documented testing and coding workflow but did not document the commit message pattern used across recent history. Adding the standard removes guesswork and gives agents a single format to follow. what: - Add a Git Commit Standards section to AGENTS.md - Document the Scope(type[detail]) subject pattern and common commit types - Include a why/what body template and a heredoc example for multi-line commits
1 parent 3156ff3 commit 7854091

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,55 @@ windows:
116116
- **Type imports**: Use `import typing as t` and access via namespace (e.g., `t.Optional`)
117117
- **Development workflow**: Format → Test → Commit → Lint/Type Check → Test → Final Commit
118118

119+
## Git Commit Standards
120+
121+
Format commit messages as:
122+
```
123+
Scope(type[detail]): concise description
124+
125+
why: Explanation of necessity or impact.
126+
what:
127+
- Specific technical changes made
128+
- Focused on a single topic
129+
```
130+
131+
Common commit types:
132+
- **feat**: New features or enhancements
133+
- **fix**: Bug fixes
134+
- **refactor**: Code restructuring without functional change
135+
- **docs**: Documentation updates
136+
- **chore**: Maintenance (dependencies, tooling, config)
137+
- **test**: Test-related updates
138+
- **style**: Code style and formatting
139+
- **py(deps)**: Dependencies
140+
- **py(deps[dev])**: Dev Dependencies
141+
- **ai(rules[AGENTS])**: AI rule updates
142+
- **ai(claude[rules])**: Claude Code rules (CLAUDE.md)
143+
- **ai(claude[command])**: Claude Code command changes
144+
145+
Example:
146+
```
147+
Pane(feat[send_keys]): Add support for literal flag
148+
149+
why: Enable sending literal characters without tmux interpretation
150+
what:
151+
- Add literal parameter to send_keys method
152+
- Update send_keys to pass -l flag when literal=True
153+
- Add tests for literal key sending
154+
```
155+
For multi-line commits, use heredoc to preserve formatting:
156+
```bash
157+
git commit -m "$(cat <<'EOF'
158+
feat(Component[method]) add feature description
159+
160+
why: Explanation of the change.
161+
what:
162+
- First change
163+
- Second change
164+
EOF
165+
)"
166+
```
167+
119168
## Logging Standards
120169

121170
These rules guide future logging changes; existing code may not yet conform.

0 commit comments

Comments
 (0)