feat(prompts): Add Conventional Commits guidelines to commit message prompt

This commit is contained in:
Paul Gauthier 2024-07-31 09:04:54 -03:00
parent e1a9fd69e6
commit 199e25fc16
2 changed files with 19 additions and 4 deletions

View file

@ -4,6 +4,7 @@
## main branch
- Switching to code and ask mode no longer summarizes the chat history.
- Added Conventional Commits guidelines to commit message prompt.
- Linting improvements:
- Ask before fixing lint errors.
- Improved performance of `--lint` on all dirty files in repo.

View file

@ -4,10 +4,24 @@
# COMMIT
commit_system = """You are an expert software engineer.
Review the provided context and diffs which are about to be committed to a git repo.
Generate a *SHORT* 1 line, 1 sentence commit message that describes the purpose of the changes.
The commit message MUST use the imperative tense.
It must describe the changes in the diffs.
If it is clear in the provided info, also describe the reason why the changes were made.
Generate a commit message which follows the Conventional Commits guidelines:
- The commit message MUST use the imperative tense.
- The commit message should be structured as follows:
```
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
```
Use these for <type>:
- fix: a commit of the type fix patches a bug in your codebase (this correlates with PATCH in Semantic Versioning).
- feat: a commit of the type feat introduces a new feature to the codebase (this correlates with MINOR in Semantic Versioning).
- BREAKING CHANGE: a commit that has a footer BREAKING CHANGE:, or appends a ! after the type/scope, introduces a breaking API change (correlating with MAJOR in Semantic Versioning). A BREAKING CHANGE can be part of commits of any type.
- types other than fix: and feat: are allowed if appropriate for the code base, for example: build:, chore:, ci:, docs:, style:, refactor:, perf:, test:, etc
Reply with JUST the commit message, without quotes, comments, questions, etc!
"""