|
44 | 44 | Take initiative, take responsibility, and take pride in completing tasks to their fullest. |
45 | 45 | Never submit code you would not be confident using in a live production environment. |
46 | 46 |
|
47 | | -**Commit Message Guidelines:** |
48 | | -
|
49 | | -If the user requests a commit message, generate a concise, descriptive message that summarizes the change. |
50 | | -The message should be one to two lines, easy to read, and clearly communicate the purpose and impact of the change. |
51 | | -
|
52 | 47 | """ |
53 | 48 |
|
54 | 49 | ASSISTANT_SYSTEM_PROMPT = """ |
|
339 | 334 | """ |
340 | 335 |
|
341 | 336 | CMD_COMMIT_PROMPT = """ |
342 | | -Generate a conventional commit message that summarizes the changes since the previous commit. |
| 337 | +Generate a conventional commit message that accurately and comprehensively summarizes **all** changes staged since the previous commit. |
343 | 338 |
|
344 | 339 | **Instructions:** |
345 | | -1. Write a brief, clear description, focusing on what was changed, added, removed, or refactored. Summarize the implementation approach or the nature of the changes, while providing just enough context to understand them: |
346 | | - - This description must be written in third person and should begin with "This commit" followed by a verb (e.g., "This commit adds", "This commit fixes", "This commit refactors") or "This commit introduces" for new features or concepts. |
| 340 | +1. Write a clear, descriptive subject line that reflects the full scope of the staged changes. The message must: |
| 341 | + - Capture all significant changes, additions, removals, or refactors across all affected files, features, or modules. |
| 342 | + - Be as representative and bounded as possible: do not omit any major change, and do not focus only on a subset if the commit is broad. |
| 343 | + - For large or multi-file commits, summarize the main areas, features, or modules affected, grouping related changes and mentioning all key updates. |
| 344 | + - The description must be written in third person and should begin with "This commit" followed by a verb (e.g., "This commit adds", "This commit fixes", "This commit refactors") or "This commit introduces" for new features or concepts. |
347 | 345 |
|
348 | 346 | 2. Place only the commit subject line inside the commit block: |
349 | 347 | *** Begin Commit |
|
352 | 350 |
|
353 | 351 | 3. **Conventional Commit Format Rules:** |
354 | 352 | - Use format: `type(scope): description` |
355 | | - - **Types:** feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert |
| 353 | + - **Types:** feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert, prompt |
356 | 354 | - **Scope:** Optional, use lowercase (e.g., api, ui, auth, database) |
357 | 355 | - **Description:** Imperative mood, lowercase, no period, max 50 chars |
358 | 356 | - **Breaking changes:** Add `!` after type/scope or use `BREAKING CHANGE:` in footer |
359 | 357 |
|
360 | 358 | 4. **Best Practices:** |
361 | 359 | - Use imperative mood: "add feature" not "added feature" |
362 | | - - Be specific but concise |
| 360 | + - Be specific, comprehensive, and concise |
363 | 361 | - Focus on the "what" and "why", not the "how" |
364 | | - - Group related changes under appropriate types |
| 362 | + - Group related changes under appropriate types and mention all major affected areas |
365 | 363 | - Use consistent terminology across commits |
| 364 | + - For large commits, mention all key files, modules, or features updated (e.g., "update user and auth modules", "refactor api and utils", "add tests for models and controllers") |
| 365 | + - The commit message must be bounded to the actual staged code and reflect all significant updates |
366 | 366 |
|
367 | 367 | 5. If no staged diffs are provided, reply that there's nothing to commit. |
368 | 368 |
|
|
391 | 391 | - `prompts(ai): update system prompt for better code generation` |
392 | 392 | - `build: upgrade webpack to v5.0` |
393 | 393 | - `feat!: remove deprecated user endpoints` |
| 394 | +- `refactor(api,utils): update request handling and helpers` |
| 395 | +- `test(models,controllers): add tests for user and order logic` |
| 396 | +- `feat(auth,ui): implement login page and backend logic` |
394 | 397 | """ |
395 | 398 |
|
396 | 399 | STAGED_DIFFS_TEMPLATE = """ |
|
0 commit comments