-
Notifications
You must be signed in to change notification settings - Fork 3
Create copilot-instructions.md with guidelines #194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,61 @@ | ||||||
| ## Development Practices | ||||||
|
|
||||||
| - Start with minimal, lean implementations focused on proof-of-concept | ||||||
| - Avoid creating new files until asked | ||||||
| - Avoid implementing things from scratch | ||||||
| - Avoid defensive error handling for hypothetical failures | ||||||
| - Use print statements and logging sparingly, unless asked | ||||||
| - Avoid light wrappers and custom classes, unless asked | ||||||
| - Avoid `if __name__ == "__main__"` patterns in package code, unless asked | ||||||
| For example, rather than using: | ||||||
| ```python | ||||||
| from math import sqrt | ||||||
| def main(): | ||||||
| sqrt(2) | ||||||
|
|
||||||
| if __name__ == "__main__": | ||||||
| main() | ||||||
| ``` | ||||||
| Leave it as a top-level script: | ||||||
| ```python | ||||||
| from math import sqrt | ||||||
| sqrt(2) | ||||||
| ``` | ||||||
| - Skip unit tests unless explicitly requested | ||||||
| - Follow patterns in CONTRIBUTING.md when present | ||||||
| - Prefer writing Python if no language specified | ||||||
| - For complex code changes, use your Serena MCP tools (e.g., `find_symbol`, `find_referencing_symbols`, and `insert_after_symbol`) for symbol-based code editing instead of always relying on regex for code modifications | ||||||
|
|
||||||
| ## Git Operations | ||||||
|
|
||||||
| - When asked to remove all file changes, use `git checkout -- <filename>` | ||||||
| - Copy-paste commands you run and summarized execution status directly in your comment replies | ||||||
|
|
||||||
| ## External Resources | ||||||
|
|
||||||
| - Validate and access link content using your available MCP tools (Playwright and/or Perplexity) | ||||||
| - Search GitHub for relevant open-source alternatives to commercial tools | ||||||
| - Prioritize official package documentation over inferred usage by using your Context7 MCP tool | ||||||
|
||||||
| - Prioritize official package documentation over inferred usage by using your Context7 MCP tool | |
| - Prioritize official package documentation over inferred usage by using available Context7 MCP tools |
Copilot
AI
Oct 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This guideline is incomplete. It doesn't specify the format or pattern for these hyperlinks (e.g., should they follow the same pattern as line 60 with https://github.com/<user/org>/<repo>/blob/<hash>/<filepath>?). Consider adding an example or referencing the format from the previous guideline.
| - If you mention files in your comment reply, add direct hyperlinks based on the shortened (7-character) commit hash | |
| - If you mention files in your comment reply, add direct hyperlinks using the format `https://github.com/<user/org>/<repo>/blob/<shortened-commit-hash>/<filepath>`, with the commit hash truncated to 7 characters. For example, `https://github.com/AccelerationConsortium/evaluation-metrics/blob/52754e7/scripts/bo_benchmarks/demonstrations/branin_campaign_demonstration_results.png?raw=true`. Use the same pattern as for plots in the previous guideline. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The guideline states 'in package code' but the context of when this pattern should be avoided versus allowed is unclear. Consider clarifying whether this applies to all Python files in the repository or specifically to library/package modules (as opposed to standalone scripts or entry points).