Rewrite copilot-instructions.md to remove redundant context#638
Open
hdwhdw wants to merge 2 commits intosonic-net:masterfrom
Open
Rewrite copilot-instructions.md to remove redundant context#638hdwhdw wants to merge 2 commits intosonic-net:masterfrom
hdwhdw wants to merge 2 commits intosonic-net:masterfrom
Conversation
Replace the auto-generated style instructions file with only non-discoverable gotchas and code review guidance, per Addy Osmani's argument that redundant AI context inflates cost and reduces agent task success rates. Removed: directory tree, naming conventions, build commands that don't work outside SONiC build env, dependency lists, generic Go style guidance — all discoverable by reading the code. Added: sibling repo layout requirement, silent write-disable via build tags, vendor corruption on partial failure, pure.mk as local CI, and review guidance to prefer pure packages and idiomatic Go project layout for new code. Signed-off-by: Dawei Huang <[email protected]>
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR rewrites .github/copilot-instructions.md to remove broadly discoverable repository context and keep only high-signal build/test gotchas plus code review guidance, reducing instruction bloat for automated agents and reviewers.
Changes:
- Replaces the prior long-form project overview with a short “Non-obvious gotchas” list focused on local build/CI pitfalls.
- Adds/keeps guidance intended to steer new changes toward “pure” packages and idiomatic Go layout.
Co-authored-by: Copilot <[email protected]>
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
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.
Replace the auto-generated style instructions file with only non-discoverable gotchas and code review guidance.
Why: Per Addy Osmani's argument, redundant AI context (directory trees, naming conventions, dependency lists) inflates agent cost ~20% and reduces task success rates. It also increase the burden on maintainers to keep these instruction up to date or risk misleading the agent. Agent should discover the information dynamically by reading code.
Removed:
go get -u,go test ./...)Kept/Added (non-discoverable only):
pure.mkis the local dev CIAdded code review guidance:
pure.mk) for new codeinternal/,pkg/) over new top-level directories