From ad69b2ee65c95fd082fd27c8a300488898b19c9a Mon Sep 17 00:00:00 2001 From: Nick Galluzzo Date: Tue, 5 Aug 2025 17:48:25 +0700 Subject: [PATCH 1/2] docs(prompt_manager): update commit prompt instructions for clarity and leniency in evaluation criteria - Adjusted description focus to include reasoning and impact - Clarified refactor type definition for better understanding - Added leniency note for low impact changes in evaluation scoring - Improved overall readability of prompt guidelines --- src/diffmage/ai/prompt_manager.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/diffmage/ai/prompt_manager.py b/src/diffmage/ai/prompt_manager.py index 827bc66..6007566 100644 --- a/src/diffmage/ai/prompt_manager.py +++ b/src/diffmage/ai/prompt_manager.py @@ -32,18 +32,18 @@ def get_commit_prompt( Instructions: - Use conventional commits format:(): - - 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 + {diff_content} @@ -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 From 6d7bfe25138610516f2caa9c591485bb96a20471 Mon Sep 17 00:00:00 2001 From: Nick Galluzzo Date: Tue, 5 Aug 2025 17:51:22 +0700 Subject: [PATCH 2/2] test(ai): remove outdated assertion for commit prompt length requirement --- tests/ai/test_prompt_manager.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/ai/test_prompt_manager.py b/tests/ai/test_prompt_manager.py index a900921..3f5f496 100644 --- a/tests/ai/test_prompt_manager.py +++ b/tests/ai/test_prompt_manager.py @@ -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