Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 43 additions & 2 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,44 @@
Please see [AGENTS.md](../AGENTS.md).
When reviewing code, focus on:

Follow the repository instructions defined in `AGENTS.md` when working in this codebase.
## Security Critical Issues
Comment on lines +1 to +3
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

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

There is still a template copy at custom-instructions/repo/.github/copilot-instructions.md that references AGENTS.md, which this PR deletes. Consider updating/removing that template file (or aligning it with the restored instructions here) to avoid broken references and confusion for anyone using the template.

Copilot uses AI. Check for mistakes.
- Check for hardcoded secrets, API keys, or credentials.
- Check for instances of potential method call injection, dynamic code execution, symbol injection or other code injection vulnerabilities.

## Performance Red Flags
- Spot inefficient loops and algorithmic issues.
- Check for memory leaks and resource cleanup.

## Code Quality Essentials
- Methods should be focused and appropriately sized. If a method is doing too much, suggest refactorings to split it up.
- Use clear, descriptive naming conventions.
- Avoid encapsulation violations and ensure proper separation of concerns.
- All public classes, modules, and methods should have clear documentation in Sphinx format.

## PyMongo-specific Concerns
- Do not review files within `pymongo/synchronous` or files in `test/` that also have a file of the same name in `test/asynchronous` unless the reviewed changes include a `_IS_SYNC` statement. PyMongo generates these files from `pymongo/asynchronous` and `test/asynchronous` using `tools/synchro.py`.
- All asynchronous functions must not call any blocking I/O.

## Review Style
- Be specific and actionable in feedback.
- Explain the "why" behind recommendations.
- Acknowledge good patterns when you see them.
- Ask clarifying questions when code intent is unclear.

Always prioritize security vulnerabilities and performance issues that could impact users.

Always suggest changes to improve readability and testability. For example, this suggestion seeks to make the code more readable, reusable, and testable:

```python
# Instead of:
if user.email and "@" in user.email and len(user.email) > 5:
submit_button.enabled = True
else:
submit_button.enabled = False

# Consider:
def valid_email(email):
return email and "@" in email and len(email) > 5


submit_button.enabled = valid_email(user.email)
```
44 changes: 0 additions & 44 deletions AGENTS.md

This file was deleted.