agentleFS
Microsoft AzureKnown publisherAzure/CosmosDBShell/.github/copilot-instructions.md

CosmosDBShell

Copilot instructions4 starsChanged 3 months agoMITView on GitHub

The file

Show its rules and text

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

15 rules. About 0 are common, 11 are distinctive, and 4 are 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.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Keep changes minimal and targeted.

    line 12
  2. Distinctive:

    Prefer clear names over abbreviations unless the command surface already established the shorthand.

    line 14
  3. Distinctive:

    Avoid adding comments unless they explain a non-obvious constraint or lifecycle detail.

    line 15
  4. Distinctive:

    When renaming a command, update all of the following together:

    line 25
  5. Distinctive:

    Keep help text aligned with the real CLI behavior.

    line 36
  6. Distinctive:

    If a CLI option changes, update both the localized help strings and the user documentation.

    line 37
  7. Distinctive:

    Update README.md for user-visible CLI changes.

    line 41
  8. Very specific:

    Always retain ## Unreleased at the top of CHANGELOG.md, even when it is empty.

    line 42
  9. Very specific:

    Update the relevant docs in docs/, especially:

    line 43
  10. Very specific:

    Add or update tests in CosmosDBShell.Tests/ when changing behavior.

    line 50
  11. Distinctive:

    Prefer focused command tests for command behavior changes.

    line 51
  12. Distinctive:

    If behavior changes, update tests and docs in the same change.

    line 66
  13. Very specific:

    When creating Git commits, do not add Copilot or AI Co-authored-by trailers.

    line 70
  14. Distinctive:

    Ensure commit messages are clear, concise, and follow the project's existing style.

    line 71
  15. Distinctive:

    Use the imperative mood in commit messages (e.g., "Add feature" instead of "Added feature").

    line 72

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

Project Overview

  • This repository is a C#/.NET CLI for Azure Cosmos DB shell workflows.
  • The main app lives in CosmosDBShell/.
  • Tests live in CosmosDBShell.Tests/.
  • Docs live in docs/ and the root README.md.

Coding Guidelines

  • Keep changes minimal and targeted. Do not refactor unrelated code while fixing a focused issue.
  • Match the existing C# style and file structure used in the surrounding code.
  • Prefer clear names over abbreviations unless the command surface already established the shorthand.
  • Avoid adding comments unless they explain a non-obvious constraint or lifecycle detail.

Commands

  • Shell commands live in CosmosDBShell/Azure.Data.Cosmos.Shell.Commands/.
  • New or changed commands should use the existing metadata attributes:
    • CosmosCommand
    • CosmosExample
    • CosmosOption
    • CosmosParameter
  • When renaming a command, update all of the following together:
    • command attribute name
    • examples
    • help/localization strings
    • docs
    • tests
    • class and file names when appropriate

Localization And Help Text

  • User-facing command descriptions and option descriptions are stored in CosmosDBShell/lang/en.ftl.
  • Keep help text aligned with the real CLI behavior.
  • If a CLI option changes, update both the localized help strings and the user documentation.

Documentation

  • Update README.md for user-visible CLI changes.
  • Always retain ## Unreleased at the top of CHANGELOG.md, even when it is empty. When preparing a release, move its entries into a dated version section below it; never replace or remove the Unreleased heading.
  • Update the relevant docs in docs/, especially:
    • docs/commands.md for command usage
    • docs/navigation.md for CLI arguments and shell navigation
    • docs/mcp.md for MCP behavior

Tests And Validation

  • Add or update tests in CosmosDBShell.Tests/ when changing behavior.
  • Prefer focused command tests for command behavior changes.
  • Validate changes with build at minimum:
    • dotnet build CosmosDBShell/CosmosDBShell.csproj
    • dotnet build CosmosDBShell.Tests/CosmosDBShell.Tests.csproj

Project-Specific Pitfalls

  • Be careful with state transitions in the shell. Some states share the same CosmosClient, so disposing the old state during navigation can break the new state.
  • Be careful with iterator lifetimes when returning IAsyncEnumerable<T>; do not dispose iterators before enumeration completes.
  • MCP in this repo is HTTP-only. The --mcp option optionally accepts a port and defaults to 6128.

Preferred Change Pattern

  • Fix root causes instead of patching symptoms.
  • Preserve public behavior unless the task explicitly changes the CLI or output contract.
  • If behavior changes, update tests and docs in the same change.

Commits

  • When creating Git commits, do not add Copilot or AI Co-authored-by trailers.
  • Ensure commit messages are clear, concise, and follow the project's existing style.
  • Use the imperative mood in commit messages (e.g., "Add feature" instead of "Added feature").
  • Reference relevant issues or pull requests in the commit message when applicable.

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.