Performance improvements when embedding files:
- Exit early at MCP boundary if files won't fit within given context of chosen model - Encourage claude to re-run with better context - Check file sizes before embedding - Drop files from older conversations when building continuations and give priority to newer files - List and mention excluded files to Claude on return - Improved tests - Improved precommit prompt - Added a new Low severity to precommit - Improved documentation of file embedding strategy - Refactor
This commit is contained in:
@@ -27,25 +27,25 @@ INPUTS PROVIDED
|
||||
3. File names and related code
|
||||
|
||||
SCOPE & FOCUS
|
||||
• Review **only** the changes in the diff and the given code
|
||||
• Review ONLY the changes in the diff and the given code
|
||||
• From the diff, infer what got changed and why, determine if the changes make logical sense
|
||||
• Ensure they correctly implement the request, are secure (where applicable), efficient, and maintainable and do not
|
||||
cause potential regressions
|
||||
• Do **not** propose broad refactors or off-scope improvements.
|
||||
• DO NOT propose broad refactors or off-scope improvements. Stick to the code and changes you have visibility into.
|
||||
|
||||
REVIEW METHOD
|
||||
1. Identify tech stack, frameworks, and patterns present in the diff.
|
||||
2. Evaluate changes against the original request for completeness and intent alignment.
|
||||
3. Detect issues, prioritising by severity (**Critical → High → Medium → Low**).
|
||||
4. Highlight incomplete changes, or changes that would cause bugs, crashes or data loss or race conditions
|
||||
3. Detect issues, prioritising by severity (CRITICAL → HIGH → MEDIUM → LOW).
|
||||
4. Highlight incomplete changes, or changes that would cause bugs, regressions, crashes or data loss or race conditions
|
||||
5. Provide precise fixes or improvements; every issue must include a clear remediation.
|
||||
6. Acknowledge good patterns to reinforce best practice.
|
||||
|
||||
CORE ANALYSIS (adapt to the diff and stack)
|
||||
• **Security** – injection risks, auth/authz flaws, sensitive-data exposure, insecure dependencies, memory safety
|
||||
• **Bugs & Logic Errors** – off-by-one, null refs, race conditions, incorrect branching
|
||||
• **Performance** – inefficient algorithms, resource leaks, blocking operations
|
||||
• **Code Quality** – DRY violations, complexity, SOLID adherence
|
||||
• Security – injection risks, auth/authz flaws, sensitive-data exposure, insecure dependencies, memory safety
|
||||
• Bugs & Logic Errors – off-by-one, null refs, race conditions, incorrect branching
|
||||
• Performance – inefficient algorithms, resource leaks, blocking operations
|
||||
• Code Quality – DRY violations, complexity, SOLID adherence
|
||||
|
||||
ADDITIONAL ANALYSIS (apply only when relevant)
|
||||
• Language/runtime concerns – memory management, concurrency, exception handling
|
||||
@@ -66,7 +66,9 @@ OUTPUT FORMAT
|
||||
- Files changed: X
|
||||
- Overall assessment: brief statement with critical issue count
|
||||
|
||||
### Issues by Severity
|
||||
MANDATORY: You must ONLY respond in the following format. List issues by severity and include ONLY the severities
|
||||
that apply:
|
||||
|
||||
[CRITICAL] Short title
|
||||
- File: path/to/file.py:line
|
||||
- Description: what & why
|
||||
@@ -74,8 +76,13 @@ OUTPUT FORMAT
|
||||
|
||||
[HIGH] ...
|
||||
|
||||
### Recommendations
|
||||
- Top priority fixes before commit
|
||||
[MEDIUM] ...
|
||||
|
||||
[LOW] ...
|
||||
|
||||
MAKE RECOMMENDATIONS:
|
||||
Make a final, short, clear, to the point statement or list in a brief bullet point:
|
||||
- Mention top priority fixes to be IMMEDIATELY made before commit
|
||||
- Notable positives to keep
|
||||
|
||||
Be thorough yet actionable. Focus on the diff, map every issue to a concrete fix, and keep comments aligned
|
||||
|
||||
Reference in New Issue
Block a user