Skip to content

chore: strengthen pre-edit-check self-verification wording#181

Merged
marcusquinn merged 2 commits intomainfrom
chore/strengthen-pre-edit-check-wording
Jan 24, 2026
Merged

chore: strengthen pre-edit-check self-verification wording#181
marcusquinn merged 2 commits intomainfrom
chore/strengthen-pre-edit-check-wording

Conversation

@marcusquinn
Copy link
Owner

@marcusquinn marcusquinn commented Jan 24, 2026

Summary

  • Replaces passive "confirm you've run this check" with active imperative wording
  • Makes clear the script handles exception logic (e.g. planning files on main), not the agent's judgement
  • Prevents agents from skipping the mandatory pre-edit-check by reasoning "it's just a TODO edit"

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:

Self-verification: Before ANY file operation, confirm you've run this check in this session.

After:

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).

Why this works

  1. Active voice — "Your FIRST tool call MUST be" vs passive "confirm"
  2. Removes ambiguity — Explicitly states the script handles exceptions, not the agent
  3. Interrupt pattern — "STOP and run it now" triggers even mid-task
  4. Addresses root cause — Agents won't skip by reasoning about file type

Summary by CodeRabbit

  • Chores
    • Updated internal development guidance documentation to clarify verification procedures for development workflows.

✏️ Tip: You can customize this high-level summary in your review settings.

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'.
@gemini-code-assist
Copy link

Summary of Changes

Hello @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 pre-edit-check.sh script's self-verification instructions within the .agent/AGENTS.md file. The update aims to eliminate ambiguity and ensure that all agents consistently execute the pre-edit check before any file modification, regardless of file type, by making the instructions more direct and emphasizing the script's role in determining exceptions.

Highlights

  • Strengthened Self-Verification Wording: Replaced passive language with active, imperative instructions for running the pre-edit-check.sh script, emphasizing it as the first tool call before any edit or write operation.
  • Clarified Exception Handling: Explicitly stated that the pre-edit-check.sh script, not the agent, is responsible for handling exception logic for file types, including TODO.md and planning files.
  • Prevented Mandatory Check Skipping: Added clear instructions to prevent agents from bypassing the mandatory pre-edit-check by reasoning about file types, reinforcing that there are no exceptions.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 24, 2026

Warning

Rate limit exceeded

@marcusquinn has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 13 minutes and 28 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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) detected

CodeRabbit 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.

Walkthrough

This PR refines self-verification guidance in .agent/AGENTS.md by mandating the pre-edit script invocation as the FIRST tool call before any Edit/Write operations and establishing a mandatory stop-and-run clause if pre-edit-check.sh hasn't executed during the current session.

Changes

Cohort / File(s) Summary
Self-Verification Guidance
\.agent/AGENTS\.md
Enhanced pre-edit requirement specification: elevated pre-edit script invocation to mandatory first tool call status and added explicit stop-and-run clause for unexecuted pre-edit-check.sh in current session

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Poem

✨ First comes the check, before the pen,
A guardian clause to run again—
Pre-edit precision, no shortcuts allowed,
Zero Debt standing tall and proud! 🛡️

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: strengthening the wording of pre-edit-check self-verification guidance in .agent/AGENTS.md to be more imperative and explicit.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
**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).

@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 446 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Sat Jan 24 21:05:20 UTC 2026: Code review monitoring started
Sat Jan 24 21:05:20 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 446
Sat Jan 24 21:05:20 UTC 2026: Qlty - 0 issues found, auto-formatting applied
Sat Jan 24 21:05:22 UTC 2026: Codacy analysis completed with auto-fixes

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 446
  • VULNERABILITIES: 0

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.
@sonarqubecloud
Copy link

@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 446 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Sat Jan 24 21:07:55 UTC 2026: Code review monitoring started
Sat Jan 24 21:07:55 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 446
Sat Jan 24 21:07:55 UTC 2026: Qlty - 0 issues found, auto-formatting applied
Sat Jan 24 21:07:57 UTC 2026: Codacy analysis completed with auto-fixes

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 446
  • VULNERABILITIES: 0

Generated on: Sat Jan 24 21:09:19 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@marcusquinn marcusquinn merged commit d7129f9 into main Jan 24, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant