trim agent formatting guidance#17617
Open
titusfortner wants to merge 1 commit into
Open
Conversation
Contributor
Review Summary by QodoConsolidate and clarify agent formatting guidance as pre-push concern
WalkthroughsDescription• Removes duplicate formatting guidance from agent instruction files • Consolidates formatting context into main AGENTS.md with clarified scope • Shifts formatting from post-edit to pre-push concern with hook recommendation • Removes language-specific formatting details that duplicate main guidance Diagramflowchart LR
A["Duplicate formatting<br/>guidance across files"] -->|consolidate| B["Single source in<br/>AGENTS.md"]
C["Post-edit formatting<br/>instruction"] -->|reframe| D["Pre-push hook<br/>recommendation"]
E["Language-specific<br/>formatting details"] -->|remove| F["Cleaner agent<br/>instructions"]
B --> G["Reduced agent<br/>context bloat"]
D --> G
F --> G
File Changes1. .github/copilot-instructions.md
|
Contributor
Code Review by Qodo
1. Format guidance mismatches CI
|
Comment on lines
+74
to
+78
| - Formatting is a pre-push concern, not a post-edit one. If `./scripts/format.sh --pre-push` is already in the user's pre-push hook, leave it alone — the hook handles it. If not, run or suggest `./scripts/format.sh` before pushing to avoid CI formatter failures, and recommend adding the hook (once): | ||
| ```bash | ||
| #!/usr/bin/env bash | ||
| ./scripts/format.sh --pre-push | ||
| ``` |
Contributor
There was a problem hiding this comment.
1. Format guidance mismatches ci 🐞 Bug ⚙ Maintainability
AGENTS.md now claims running ./scripts/format.sh before pushing avoids CI formatter failures, but the CI format job still runs ./go format and fails on any diff produced by that task. Since `./go format runs the full Rake formatting suite unconditionally while scripts/format.sh` is change-scoped, contributors may follow the new guidance yet still fail CI or receive conflicting instructions.
Agent Prompt
## Issue description
`AGENTS.md` was updated to recommend `./scripts/format.sh` / `--pre-push` to prevent CI formatter failures, but CI currently runs `./go format` and reports failures based on that command. This creates inconsistent guidance and a real risk that contributors follow the documented workflow yet still hit CI failures.
## Issue Context
- `./go format` executes the Rake `:format` task, which formats across all languages unconditionally.
- `./scripts/format.sh` is change-scoped (runs some language formatters only when matching paths changed).
- CI currently enforces formatting by running `./go format` (and tells contributors to run it).
## Fix Focus Areas
Pick one clear source-of-truth and make both CI + docs consistent:
- Update CI workflows to run `./scripts/format.sh` (optionally `--pre-push`) and update error messages to reference it, OR
- Update `AGENTS.md` to explicitly state CI runs `./go format` and recommend `./go format` as the fallback/source-of-truth if CI fails.
References:
- AGENTS.md[69-78]
- .github/workflows/ci-lint.yml[47-74]
- Rakefile[128-144]
- scripts/format.sh[1-8], scripts/format.sh[35-137]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 Related Issues
Pares back #17366
Every time my agent edits anything it runs a several minute format command completely unnecessarily (since I use a pre-push hook). I added to my
.local/AGENTS.mdfile not to do that, but it wasn't listening to me, which makes sense when I see that the demand to do this is repeated in many places.💥 What does this PR do?
AGENTS.mdis in the context window. The purpose of the other files is to be able to provide scoped information that can be loaded conditionally.🤖 AI assistance
🔄 Types of changes