agentleFS
MongoDBKnown publishermongodb/mongo-php-library/.github/copilot-instructions.md

mongo-php-library

Copilot instructions1.6k starsChanged 10 months agoApache-2.0View on GitHub

Trending

More talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 1 mentionMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 6 mentionsOct 2026: 4 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the mongodb/mongo-php-library repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about mongodb/mongo-php-library

The biggest 5 of 30 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 30

Talked about on GitHub (30 times).

On GitHub · 30

25 more on GitHub

The file

We split this copilot-instructions.md into the rules it gives an agent

12 rules. About 0 are common, 11 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Only highlight changes or notable information that was omitted from the description

    line 7
  2. Distinctive:

    Use full type declarations wherever possible

    line 12
  3. Distinctive:

    Use PHPDoc blocks to supplement native types where PHP limitations exist:

    line 14
  4. Distinctive:

    Ensure all public methods have complete type hints

    line 21
  5. Very specific:

    Use strict scalar type declarations (declare(strict_types=1))

    line 23
  6. Distinctive:

    Prefer constructor property promotion when applicable

    line 24
  7. Distinctive:

    Use named arguments for better readability in complex method calls to functions inside this package

    line 25
  8. Distinctive:

    Check for proper error handling patterns

    line 28
  9. Distinctive:

    Ensure BSON type handling is correct

    line 29
  10. Distinctive:

    Verify connection pool and client usage follows best practices

    line 30
  11. Distinctive:

    Look for potential performance implications in database operations

    line 31
  12. Distinctive:

    Ensure proper use of type maps and codecs

    line 32

≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

GitHub Copilot Instructions

Code Review Guidelines

Review Focus

  • Do not repeat or paraphrase the PR description
  • Only highlight changes or notable information that was omitted from the description
  • Focus on code quality, potential issues, and improvements not mentioned in the PR

PHP Version and Type Requirements

  • The minimum PHP version supported is in ./composer.json. Code must support this version and newer
  • Use full type declarations wherever possible
  • Leverage PHP 8.1+ features when appropriate (enums, readonly properties, intersection types, etc.)
  • Use PHPDoc blocks to supplement native types where PHP limitations exist:
    • Generics: @template T, @param Collection<T>, @return T
    • Union types for complex scenarios
    • Array shapes: @param array{name: string, age: int}
    • More specific types than native PHP allows

Code Quality Standards

  • Ensure all public methods have complete type hints
  • Private/protected methods should also be fully typed
  • Use strict scalar type declarations (declare(strict_types=1))
  • Prefer constructor property promotion when applicable
  • Use named arguments for better readability in complex method calls to functions inside this package

MongoDB Library Specific

  • Check for proper error handling patterns
  • Ensure BSON type handling is correct
  • Verify connection pool and client usage follows best practices
  • Look for potential performance implications in database operations
  • Ensure proper use of type maps and codecs

What to Flag in Reviews

  • Missing type declarations that could be added
  • Opportunities to use newer PHP features
  • Code that might not work with the minimum PHP version requirement
  • Missing PHPDoc for complex types or generics
  • Inconsistent coding standards
  • Potential performance or security issues not mentioned in PR description
  • Breaking changes that weren't highlighted
  • Documentation that needs updating due to code changes

What NOT to Comment On

  • Changes that are clearly explained in the PR description
  • Style preferences that are already covered by existing linting tools
  • Minor formatting issues that automated tools should catch

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.