Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/diffmage/ai/prompt_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,18 @@ def get_commit_prompt(

Instructions:
- Use conventional commits format:<type>(<optional scope>): <description>
- Keep the description under 100 characters
- Use imperative mood ("add", "fix", "update", not "added", "fixed", "updated")
- Focus on WHAT changed and WHY, not HOW. Consider WHAT was impacted and WHY.
- Focus on WHAT changed and WHY, not HOW. Consider WHAT was impacted and WHY it was needed.

Common types:
- feat: New feature, enhancement, or functionality
- fix: Bug fix or error correction
- refactor: Code restructuring without changing functionality
- refactor: Code restructuring for readability, performance, or maintainability
- docs: Documentation changes only
- test: Adding or updating tests
- chore: Maintenance, dependencies, build changes


<git_diff>
{diff_content}
</git_diff>
Expand Down Expand Up @@ -102,7 +102,7 @@ def get_evaluation_prompt(commit_message: str, git_diff: str) -> str:
* 5 = All changes captured accurately and completely
* 3 = Main changes described, some details missing
* 1 = Major changes omitted or misrepresented
- WHY (1-5): How clearly does it explain the purpose/reasoning/impact of the changes?
- WHY (1-5): How clearly does it explain the purpose/reasoning/impact of the changes? Be more lenient on low impact changes.
- Scale: 1=Very Poor, 2=Poor, 3=Average, 4=Good, 5=Excellent
</EVALUATION_CRITERIA>

Expand Down
1 change: 0 additions & 1 deletion tests/ai/test_prompt_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ def test_get_commit_prompt_contains_instructions():

# Check for key instructions
assert "conventional commits format" in prompt
assert "Keep the description under 100 characters" in prompt
assert "imperative mood" in prompt
assert "WHAT changed and WHY" in prompt
assert "feat:" in prompt
Expand Down