|
1 | | -Generate a conventional commit message for the current staged changes. |
| 1 | +--- |
| 2 | +model: sonnet |
| 3 | +--- |
2 | 4 |
|
3 | | -Analyze the git diff of staged files and create a commit message following conventional commits specification: |
| 5 | +Analyze all modified and untracked files, group them logically, and create one or more conventional commits. |
4 | 6 |
|
5 | 7 | ### Conventional Commits |
6 | 8 |
|
7 | 9 | **Format:** `<type>(<scope>): <description>` |
8 | 10 |
|
| 11 | +Title must be **< 72 characters**. |
| 12 | + |
9 | 13 | #### Types |
10 | 14 |
|
11 | 15 | - feat: new feature |
12 | 16 | - fix: bug fix |
13 | | -- docs: documentation |
14 | | -- style: formatting, missing semicolons, etc. |
15 | 17 | - refactor: code change that neither fixes a bug nor adds a feature |
16 | | -- test: adding or correcting tests |
| 18 | +- style: formatting, missing semicolons, etc. |
| 19 | +- perf: performance improvement |
| 20 | +- docs: documentation |
17 | 21 | - chore: maintenance tasks |
18 | 22 | - ci: continuous integration changes |
19 | | -- revert: reverts a previous commit |
20 | | - |
21 | | -### Workflow |
22 | | - |
23 | | -1. Run `git status` to see overall repository state. If there are are no staged changes, exit. |
24 | | -2. Run `git diff --staged` to analyze the actual changes |
25 | | -3. Run `git diff --stat --staged` for summary of changed files |
26 | | -4. Run `git log --oneline -10` to review recent commit patterns |
27 | | -5. Choose appropriate type and scope based on changes |
28 | | -6. Write concise description (50 chars max for first line) |
29 | | -7. Include body if changes are complex |
30 | | -8. Commit the staged changes with the generated message |
| 23 | +- test: adding or correcting tests |
31 | 24 |
|
32 | | -### Co-authors |
| 25 | +#### Scopes |
33 | 26 |
|
34 | | -Here is the collection of all previous co-authors of the repo as reference (names and emails): |
| 27 | +Use one of these fixed scopes. Omit the scope only when a change spans too many areas to pick one. |
35 | 28 |
|
36 | | -- claude: `Co-Authored-By: Claude <noreply@anthropic.com>` |
| 29 | +| Scope | Covers | |
| 30 | +|---|---| |
| 31 | +| `bot` | Core game loop, decision-making logic (`bot.py`) | |
| 32 | +| `client` | BalatroBot JSON-RPC client (`client.py`) | |
| 33 | +| `llm` | LLM client wrapper, retry logic (`llm.py`) | |
| 34 | +| `executor` | Parallel execution orchestration (`executor.py`) | |
| 35 | +| `collector` | Data collection, statistics (`collector.py`) | |
| 36 | +| `strategy` | Strategy templates, rendering (`strategy.py`, `strategies/`) | |
| 37 | +| `views` | HTTP server, HTML templates (`views.py`, `views/`) | |
| 38 | +| `config` | Configuration management (`config.py`, YAML configs) | |
| 39 | +| `cli` | CLI entry point, argument parsing (`cli.py`) | |
| 40 | +| `test:unit` | Unit tests (`tests/unit/`) | |
| 41 | +| `test:integration` | Integration tests (`tests/integration/`) | |
| 42 | +| `test:fixtures` | Test fixtures and data (`tests/fixtures/`) | |
| 43 | +| `docs` | All documentation (`docs/`, `*.md` files) | |
| 44 | +| `ci` | CI/CD workflows, Makefile | |
| 45 | +| `deps` | Dependency updates (`pyproject.toml`, `uv.lock`) | |
| 46 | +| `release` | Version bumps, changelog updates | |
37 | 47 |
|
38 | | -Here is a list of the co-authors which contributed to this commit: |
| 48 | +#### Examples |
39 | 49 |
|
40 | 50 | ``` |
41 | | -$ARGUMENTS |
| 51 | +feat(bot): add support for new game state |
| 52 | +fix(client): handle JSON-RPC timeout gracefully |
| 53 | +refactor(llm): extract retry logic into separate method |
| 54 | +test:unit: add tests for collector statistics |
| 55 | +docs: update installation instructions |
| 56 | +chore(deps): bump openai to 1.0.0 |
42 | 57 | ``` |
43 | 58 |
|
44 | | -If the list is empty, do not add any co-authors |
45 | | - |
46 | | -### Notes |
| 59 | +### Workflow |
47 | 60 |
|
48 | | -- Do not include emojis in the commit message. |
49 | | -- Do not include `🤖 Generated with [Claude Code](https://claude.ai/code)` in the commit message. |
| 61 | +1. Run `git status` to see overall repository state. If there are no changes (staged or unstaged), exit. |
| 62 | +2. Run `git diff` and `git diff --stat` to analyze all unstaged changes. |
| 63 | +3. Run `git diff --staged` and `git diff --stat --staged` to analyze already staged changes. |
| 64 | +4. Run `git log --oneline -10` to review recent commit patterns. |
| 65 | +5. Group the changed files logically by scope/purpose. If all changes belong to the same logical unit, make a single commit. If changes span multiple unrelated scopes, split them into separate commits (e.g., a dependency update and a new bot feature should be two commits). |
| 66 | +6. For each logical group, in order: |
| 67 | + a. Stage only the files for that group with `git add <file1> <file2> ...` |
| 68 | + b. Write a concise commit message (72 chars max for first line). Include a body if the changes are complex. |
| 69 | + c. Create the commit. |
| 70 | +7. After all commits, run `git log --oneline -5` to confirm the result. |
0 commit comments