chore: strengthen pre-edit-check self-verification wording#181
chore: strengthen pre-edit-check self-verification wording#181marcusquinn merged 2 commits intomainfrom
Conversation
Replace passive 'confirm you've run this check' with active imperative that makes clear: the script handles exception logic (e.g. planning files on main), not the agent's judgement. Prevents agents from skipping the mandatory check by reasoning 'it's just a TODO edit'.
Summary of ChangesHello @marcusquinn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the clarity and enforceability of the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughThis PR refines self-verification guidance in Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request strengthens the self-verification instructions for the agent, making it much clearer that the pre-edit-check.sh script is mandatory before any file edits. The use of active, imperative language and explicit inclusion of edge cases like TODO.md is a great improvement. I've added one suggestion to refine the wording slightly to avoid potential ambiguity for the agent regarding its very first action in a session, ensuring it can perform read-only operations before the check if needed, without violating the instruction.
.agent/AGENTS.md
Outdated
| **Full details**: Read `workflows/pre-edit.md` for interactive prompts, worktree creation, and edge cases. | ||
|
|
||
| **Self-verification**: Before ANY file operation, confirm you've run this check in this session. | ||
| **Self-verification**: Your FIRST tool call before any Edit/Write MUST be this script. If you are about to edit a file and have not yet run pre-edit-check.sh in this session, STOP and run it now. No exceptions — including TODO.md and planning files (the script handles exception logic, not you). |
There was a problem hiding this comment.
The instruction Your FIRST tool call before any Edit/Write MUST be this script could be ambiguous for a literal-minded agent. If the agent needs to perform a read-only tool call first (e.g., ls to see files), that would be its first tool call. This would make it impossible to then run pre-edit-check.sh without violating the 'FIRST tool call' rule, potentially causing the agent to get stuck.
To maintain the strong, imperative tone while removing this ambiguity, I suggest focusing on the action as a 'step' rather than a 'tool call'. This clarifies that running the script is the first part of the editing process, not necessarily the first action of the entire session.
| **Self-verification**: Your FIRST tool call before any Edit/Write MUST be this script. If you are about to edit a file and have not yet run pre-edit-check.sh in this session, STOP and run it now. No exceptions — including TODO.md and planning files (the script handles exception logic, not you). | |
| **Self-verification**: Your FIRST step before any Edit/Write MUST be to run this script. If you are about to edit a file and have not yet run pre-edit-check.sh in this session, STOP and run it now. No exceptions — including TODO.md and planning files (the script handles exception logic, not you). |
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Sat Jan 24 21:06:41 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
Avoids ambiguity for literal-minded agents that need to perform read-only operations (e.g. Read file) before the edit check. 'First step' clarifies this is the first part of the editing process, not the first action of the entire session.
|
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Sat Jan 24 21:09:19 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |



Summary
Context
During a session, an agent edited TODO.md directly on main without running
pre-edit-check.sh. The agent reasoned the check wasn't needed because "it's just a planning file." While the outcome was correct (planning files are allowed on main), the process was wrong — the script should always run, and the script decides exceptions.Change
Before:
After:
Why this works
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.