agentleFS
daohainamdaohainam/microservice-patterns/.github/copilot-instructions.md

microservice-patterns

Copilot instructions331 starsChanged 18 months agoMITView on GitHub

  • In this repositoryOne other file it gives its agents.

The file

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

9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Always use the latest version C#, currently C# 13 features.

    line 4
  2. Distinctive:

    Prefer file-scoped namespace declarations and single-line using directives.

    line 8
  3. Distinctive:

    Ensure that the final return statement of a method is on its own line.

    line 10
  4. Distinctive:

    Use pattern matching and switch expressions wherever possible.

    line 11
  5. Very specific:

    Use nameof instead of string literals when referring to member names.

    line 12
  6. Very specific:

    Ensure that XML doc comments are created for any public APIs.

    line 13
  7. Very specific:

    Always use is null or is not null instead of == null or != null.

    line 18
  8. Distinctive:

    Do not emit "Act", "Arrange" or "Assert" comments.

    line 24
  9. Distinctive:

    Use Moq for mocking in tests.

    line 25

≈ “Common” is an estimate: at least 1 in 5 of the 3,827 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

General

  • Make only high confidence suggestions when reviewing code changes.
  • Always use the latest version C#, currently C# 13 features.

Formatting

  • Prefer file-scoped namespace declarations and single-line using directives.
  • Insert a newline before the opening curly brace of any code block (e.g., after if, for, while, foreach, using, try, etc.).
  • Ensure that the final return statement of a method is on its own line.
  • Use pattern matching and switch expressions wherever possible.
  • Use nameof instead of string literals when referring to member names.
  • Ensure that XML doc comments are created for any public APIs. When applicable, include <example> and <code> documentation in the comments.

Nullable Reference Types

  • Declare variables non-nullable, and check for null at entry points.
  • Always use is null or is not null instead of == null or != null.
  • Trust the C# null annotations and don't add null checks when the type system says a value cannot be null.

Testing

  • We use xUnit SDK v3 for tests.
  • Do not emit "Act", "Arrange" or "Assert" comments.
  • Use Moq for mocking in tests.
  • Copy existing style in nearby files for test method names and capitalization.

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.