feat: enhance review_pending_changes tool visibility and triggers
- Update tool description to strongly encourage Claude to use it before commits - Add 'ALWAYS use this tool before creating any git commit\!' emphasis - Add comprehensive trigger words in TOOL_TRIGGERS including: - 'before commit', 'about to commit', 'ready to commit' - 'review pending changes', 'check my changes' - 'pre-commit', 'before I commit', 'should I commit' - Make it clear this is essential for code quality and preventing bugs - All tests pass (65 tests), ruff linting clean, black formatting applied
This commit is contained in:
17
config.py
17
config.py
@@ -67,4 +67,21 @@ TOOL_TRIGGERS = {
|
|||||||
"analyze file",
|
"analyze file",
|
||||||
"analyze these files",
|
"analyze these files",
|
||||||
],
|
],
|
||||||
|
"review_pending_changes": [
|
||||||
|
"review pending changes",
|
||||||
|
"check my changes",
|
||||||
|
"validate changes",
|
||||||
|
"pre-commit review",
|
||||||
|
"before commit",
|
||||||
|
"about to commit",
|
||||||
|
"ready to commit",
|
||||||
|
"review my git changes",
|
||||||
|
"check git changes",
|
||||||
|
"validate my changes",
|
||||||
|
"review staged changes",
|
||||||
|
"review unstaged changes",
|
||||||
|
"pre-commit",
|
||||||
|
"before I commit",
|
||||||
|
"should I commit",
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,12 +73,13 @@ class ReviewPendingChanges(BaseTool):
|
|||||||
|
|
||||||
def get_description(self) -> str:
|
def get_description(self) -> str:
|
||||||
return (
|
return (
|
||||||
"REVIEW PENDING GIT CHANGES - Comprehensive pre-commit review of staged/unstaged changes "
|
"REVIEW PENDING GIT CHANGES BEFORE COMMITTING - ALWAYS use this tool before creating any git commit! "
|
||||||
"or branch comparisons across multiple repositories. Searches recursively for git repos "
|
"Comprehensive pre-commit validation that catches bugs, security issues, incomplete implementations, "
|
||||||
"and analyzes diffs for bugs, security issues, incomplete implementations, and alignment "
|
"and ensures changes match the original requirements. Searches all git repositories recursively and "
|
||||||
"with original requirements. Perfect for final review before committing. "
|
"provides deep analysis of staged/unstaged changes. Essential for code quality and preventing bugs. "
|
||||||
"Triggers: 'review pending changes', 'check my changes', 'validate changes', 'pre-commit review'. "
|
"Triggers: 'before commit', 'review changes', 'check my changes', 'validate changes', 'pre-commit review', "
|
||||||
"Use this when you want to ensure changes are complete, correct, and ready to commit."
|
"'about to commit', 'ready to commit'. Claude should proactively suggest using this tool whenever "
|
||||||
|
"the user mentions committing or when changes are complete."
|
||||||
)
|
)
|
||||||
|
|
||||||
def get_input_schema(self) -> Dict[str, Any]:
|
def get_input_schema(self) -> Dict[str, Any]:
|
||||||
|
|||||||
Reference in New Issue
Block a user