agentleFS
MongoDBKnown publishermongodb/openapi/.github/copilot-instructions.md

openapi

Copilot instructions20 starsChanged 2 years agoApache-2.0View on GitHub

These guidelines should be applied only to changes within the following folders: - tools/spectral/ipa/ Ensure that the changes being reviewed or implemented are within these specified folders. If changes are outside these folders, these guidelines do not apply. Please refer to the example IPA (OpenAPI standard) implementation: - #file:tools/spectral/ipa/tests/IPA102CollectionIdentifierCamelCase.test.js - #file:tools/spectral/ipa/rulesets/IPA-102.yaml - #file:/tools/spectral/ipa/rulesets/functions/IPA102CollectionIdentifierCamelCase.js

The file

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

7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Ensure that the changes being reviewed or implemented are within these specified folders.

    line 8
  2. Very specific:

    When reviewing IPA rule implementations, act as a Node.js Software Engineer with expert knowledge in OpenAPI specifications and Spectral …

    line 11
  3. Distinctive:

    When reviewing IPA rule implementations, verify:

    line 14
  4. Distinctive:

    All rules are set at warning level

    line 15
  5. Distinctive:

    No redundant JavaScript checks for undefined inputs

    line 19
  6. Distinctive:

    Ensure the rule follows this structure:

    line 23
  7. Very specific:

    Check #file:tools/spectral/ipa/rulesets/functions/utils/collectionUtils.js for examples

    line 30

≈ “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

Copilot Review Guidelines

IPA Developement guidelines

These guidelines should be applied only to changes within the following folders:

  • tools/spectral/ipa/

Ensure that the changes being reviewed or implemented are within these specified folders. If changes are outside these folders, these guidelines do not apply.

Role and Expertise

When reviewing IPA rule implementations, act as a Node.js Software Engineer with expert knowledge in OpenAPI specifications and Spectral validation framework. Focus on ensuring rules are functional and well-documented.

Review Checklist

When reviewing IPA rule implementations, verify:

  • All rules are set at warning level
  • Exceptions are properly placed on the given object
  • Rules follow the proper format (order of checks and method names)
  • Appropriate use of resolved or unresolved Spectral documents
  • No redundant JavaScript checks for undefined inputs
  • Code follows latest Node.js best practices

Implementation Guidelines

Ensure the rule follows this structure:

  • Proper determination of component level for rule processing
  • Consistent collection of exceptions, adoptions, and violations at the same component level
  • Appropriate use of helper functions:
    • collectException(object, ruleName, jsonPath) for exceptions
    • collectAdoption(jsonPath, ruleName) for adoptions
    • collectAndReturnViolation(jsonPath, ruleName, errorData) for violations
    • Check #file:tools/spectral/ipa/rulesets/functions/utils/collectionUtils.js for examples

Context

Please refer to the example IPA (OpenAPI standard) implementation:

  • #file:tools/spectral/ipa/tests/IPA102CollectionIdentifierCamelCase.test.js
  • #file:tools/spectral/ipa/rulesets/IPA-102.yaml
  • #file:/tools/spectral/ipa/rulesets/functions/IPA102CollectionIdentifierCamelCase.js

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.