docs(#3508): add hack/ directory conventions to AGENTS.md - #3509
docs(#3508): add hack/ directory conventions to AGENTS.md#3509fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
Document that scripts in hack/ are attended developer utilities targeting RHEL 8+ / Fedora (Bash 4.4+), not production code. Add reviewer guidance to suppress low-severity robustness and portability findings (e.g., Bash <4.4 compatibility, regex dot escaping, broad git staging) and focus on correctness, data loss, git safety, and security concerns. This gives review agents the context signal needed to calibrate severity for hack/ scripts, preventing repeated low-value findings like those seen on PR #3430. Closes #3508
|
🤖 Finished Review · ✅ Success · Started 9:10 AM UTC · Completed 9:24 AM UTC Commit: |
ReviewFindingsMedium
Low
Labels: PR adds documentation conventions to AGENTS.md for the hack/ directory, calibrating agent review behavior |
|
|
||
| - Unescaped dots in sed/grep patterns operating on controlled, predictable inputs | ||
| - Hardcoded branch lists that change infrequently and are updated manually | ||
| - `git add -A` or broad staging when the script controls the entire working tree context |
There was a problem hiding this comment.
[low] technical accuracy
The bullet 'Reliance on modern Bash features (associative arrays, readarray, ${var,,}, etc.)' lists readarray and ${var,,} as examples of features relied upon, but no hack/ script currently uses them — only declare -A (associative arrays) is used in go-mod-upgrade-prs.sh. The wording implies current usage that does not exist.
Suggested fix: Reword to clarify these are permitted features rather than currently-used ones (e.g., 'Reliance on modern Bash features (associative arrays, readarray, ${var,,}, etc.) is permitted').
What:
Add a
hack/ Directory Conventionssection to AGENTS.md documenting the purpose, target environment, accepted trade-offs, and reviewer guidance for scripts in thehack/directory.Why:
On PR #3430, the review agent repeatedly raised low-severity robustness and portability findings (Bash <4.4 compatibility, regex dot escaping, broad
git add, hardcoded branch lists) on developer utility scripts inhack/. These findings were rejected by the author across 8–10 review rounds over 28 days because they applied production-code standards to attended developer utilities. The root cause is that AGENTS.md contained no guidance about thehack/directory or its intended audience and requirements.This change provides the context signal so review agents can calibrate severity from the first review — suppressing low-severity robustness/portability findings and focusing on correctness, data loss, git safety, and security concerns.
Tickets:
Closes #3508
Post-script verification
agent/3508-hack-dir-agents-guidance)a94dbb685345a1a9f664d6e4b4fc6726f6c89356..HEAD)