agentleFS
rodri-oliveira-devrodri-oliveira-dev/complexity-analyzers/.github/copilot-instructions.md

complexity-analyzers

Copilot instructions4 starsChanged 3 months agoMITView on GitHub

This repository contains ComplexityAnalysis.Analyzers, a standalone Roslyn analyzer for estimating and diagnosing algorithmic complexity in C# code. Before making changes, read the root AGENTS.md. It is the primary repository-specific instruction source and contains the detailed architecture, Roslyn, NuGet, performance, validation, and Git rules. Use the canonical Definition of Done in docs/en/development/quality-gates.md to classify the change type and choose proportional validation. Do not duplicate or bypass that policy. Use the relevant skills under .agents/skills/ when the task touches their area. Do…

The file

Show its rules and text

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

22 rules. About 0 are common, 16 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈16

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before making changes, read the root AGENTS.md.

    line 7
  2. Very specific:

    Use the canonical Definition of Done in docs/en/development/quality-gates.md to classify the change type and choose proportional validation.

    line 9
  3. Very specific:

    Use the relevant skills under .agents/skills/ when the task touches their area.

    line 11
  4. Very specific:

    Treat the repository root as the canonical workspace.

    line 15
  5. Distinctive:

    Use Roslyn syntax, symbols, semantic models, and operation identities instead of text-only matching when semantic identity matters.

    line 17
  6. Distinctive:

    Keep analyzer execution deterministic, bounded, cancellation-aware, and safe for concurrent compiler/IDE execution.

    line 18
  7. Distinctive:

    Treat analyzer performance as a functional requirement.

    line 19
  8. Very specific:

    Do not introduce Microsoft.CodeAnalysis.Workspaces unless a feature clearly requires workspace APIs.

    line 21
  9. Distinctive:

    Keep Roslyn authoring dependencies private and avoid unnecessary transitive runtime dependencies in the NuGet package.

    line 22
  10. Distinctive:

    Do not routinely upgrade the pinned Roslyn compiler API baseline without explicit compatibility evaluation across supported SDK/compiler …

    line 24
  11. Distinctive:

    Add or update tests for behavior changes and bug fixes.

    line 28
  12. Very specific:

    When a public diagnostic changes, update src/ComplexityAnalysis.Analyzers/AnalyzerReleases.Unshipped.md when required by analyzer release …

    line 30
  13. Distinctive:

    Keep English and Portuguese public documentation aligned when behavior, configuration, diagnostics, compatibility, or package usage changes.

    line 31
  14. Distinctive:

    Run validation proportional to the change.

    line 36
  15. Distinctive:

    When packaging behavior changes, also validate a local package:

    line 44
  16. Distinctive:

    Use the repository's focused compatibility, package-contract, coverage, and performance tests when relevant to the change.

    line 54
  17. Distinctive:

    Keep pull requests focused and review the final diff before concluding.

    line 59
  18. Very specific:

    Do not commit local artifacts/, packages, coverage output, or build output.

    line 60
  19. Distinctive:

    Never expose machine-specific absolute paths, local usernames, home directories, or resolved tool installation paths in PR descriptions, …

    line 61
  20. Distinctive:

    Before creating or updating a Pull Request, sanitize the final public text so machine-specific environment details are removed.

    line 63
  21. Distinctive:

    Do not create tags, GitHub Releases, publish NuGet packages, publish GitHub Packages, or otherwise perform a release unless explicitly …

    line 64
  22. Distinctive:

    Do not weaken CI, security, compatibility, or quality gates merely to make a change pass.

    line 65

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

This repository contains ComplexityAnalysis.Analyzers, a standalone Roslyn analyzer for estimating and diagnosing algorithmic complexity in C# code.

Start here

Before making changes, read the root AGENTS.md. It is the primary repository-specific instruction source and contains the detailed architecture, Roslyn, NuGet, performance, validation, and Git rules.

Use the canonical Definition of Done in docs/en/development/quality-gates.md to classify the change type and choose proportional validation. Do not duplicate or bypass that policy.

Use the relevant skills under .agents/skills/ when the task touches their area. Do not load unrelated repository content unnecessarily.

Core invariants

  • Treat the repository root as the canonical workspace. Do not reintroduce an analyzer/ workspace boundary.
  • Preserve conservative analysis: prefer Unknown over an unsafe or unproven complexity estimate.
  • Use Roslyn syntax, symbols, semantic models, and operation identities instead of text-only matching when semantic identity matters.
  • Keep analyzer execution deterministic, bounded, cancellation-aware, and safe for concurrent compiler/IDE execution.
  • Treat analyzer performance as a functional requirement. Avoid broad scans, I/O, network access, process execution, and heavyweight reflection in analyzer hot paths.
  • Preserve analyzer host compatibility. The analyzer project targets netstandard2.0 unless an explicit architecture decision changes that contract.
  • Do not introduce Microsoft.CodeAnalysis.Workspaces unless a feature clearly requires workspace APIs.
  • Keep Roslyn authoring dependencies private and avoid unnecessary transitive runtime dependencies in the NuGet package.
  • Preserve the analyzer package layout with the analyzer assembly under analyzers/dotnet/cs/ rather than a normal runtime lib/ asset.
  • Do not routinely upgrade the pinned Roslyn compiler API baseline without explicit compatibility evaluation across supported SDK/compiler hosts.

Tests and public behavior

  • Add or update tests for behavior changes and bug fixes. Analyzer diagnostics should normally include triggering and non-triggering coverage.
  • Changes to interprocedural analysis, recursion/recurrence solving, caching, budgets, known operations, or package loading must consider compatibility and performance regressions.
  • When a public diagnostic changes, update src/ComplexityAnalysis.Analyzers/AnalyzerReleases.Unshipped.md when required by analyzer release tracking.
  • Keep English and Portuguese public documentation aligned when behavior, configuration, diagnostics, compatibility, or package usage changes.
  • New analyzer configuration options must be documented in both docs/en/configuration.md and docs/pt-BR/configuration.md.

Validation

Run validation proportional to the change. For analyzer, MSBuild, NuGet, packaging, or broad repository changes, use the root solution:

dotnet restore ComplexityAnalysis.Analyzers.slnx
dotnet build ComplexityAnalysis.Analyzers.slnx --configuration Release --no-restore
dotnet test ComplexityAnalysis.Analyzers.slnx --configuration Release --no-build

When packaging behavior changes, also validate a local package:

dotnet pack src/ComplexityAnalysis.Analyzers/ComplexityAnalysis.Analyzers.csproj \
  --configuration Release \
  --no-build \
  -p:PackageVersion=0.0.0-local \
  --output artifacts/local-packages

Use the repository's focused compatibility, package-contract, coverage, and performance tests when relevant to the change.

Git and release safety

  • Use Conventional Commits.
  • Keep pull requests focused and review the final diff before concluding.
  • Do not commit local artifacts/, packages, coverage output, or build output.
  • Never expose machine-specific absolute paths, local usernames, home directories, or resolved tool installation paths in PR descriptions, documentation, issues, or comments.
  • Report validation with portable commands such as dotnet and repository-relative paths, even when execution internally used an absolute executable path.
  • Before creating or updating a Pull Request, sanitize the final public text so machine-specific environment details are removed.
  • Do not create tags, GitHub Releases, publish NuGet packages, publish GitHub Packages, or otherwise perform a release unless explicitly requested by the user/maintainer.
  • Do not weaken CI, security, compatibility, or quality gates merely to make a change pass.

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.