agentleFS
Microsoft AzureKnown publisherAzure/openapi-diff/.github/copilot-instructions.md

openapi-diff

Copilot instructions290 starsChanged 9 months agoMITView on GitHub

This repository contains the source code for openapi-diff (aka oad, aka @azure/oad), a breaking-change detector tool for OpenAPI specifications. It is published as an npm package and is used internally by the azure-rest-api-specs and azure-rest-api-specs-pr repos to validate PRs. The core diff logic is written in C#/.NET and the CLI/validation layer is written in TypeScript. TypeScript tests live in src/test/ and follow the naming pattern *[tT]est.ts. CI runs on both Ubuntu and Windows via GitHub Actions (.github/workflows/ci.yml). It runs: npm…

The file

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Prefer const over let where possible

    line 64
  2. Very specific:

    Run npm run lint and npm run prettier before submitting changes.

    line 90
  3. Very specific:

    Add or update tests in src/test/ for any TypeScript code changes.

    line 91
  4. Very specific:

    Do not modify CI/CD pipeline files (.github/workflows/, azure-pipelines.yml) unless specifically required.

    line 92
  5. Very specific:

    When working only on TypeScript, use npm run ts.test to run just the TypeScript tests.

    line 93

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

Project Overview

This repository contains the source code for openapi-diff (aka oad, aka @azure/oad), a breaking-change detector tool for OpenAPI specifications. It is published as an npm package and is used internally by the azure-rest-api-specs and azure-rest-api-specs-pr repos to validate PRs.

The core diff logic is written in C#/.NET and the CLI/validation layer is written in TypeScript.

Tech Stack

  • TypeScript (ES2017 target, CommonJS modules) — CLI, validation, and test code in src/
  • C#/.NET 6 — core diff engine in openapi-diff/
  • Node.js 20+
  • Jest with ts-jest for TypeScript tests
  • ESLint (typescript-eslint) for linting
  • Prettier for formatting
  • markdownlint for Markdown style

Setup

npm ci                # Install Node.js dependencies
npm run dn.restore    # Restore .NET dependencies (if working on C# code)

Build

npm run tsc           # Build TypeScript code (outputs to dist/)
npm run dn.build      # Build C# code

Lint and Format

npm run lint          # Run ESLint (zero warnings allowed)
npm run lint:fix      # Auto-fix ESLint issues
npm run prettier      # Check formatting with Prettier
npm run prettier:write # Auto-fix formatting

Test

npm run ts.test       # Run TypeScript tests (Jest)
npm run dn.test       # Run C# tests (dotnet test)
npm test              # Run both C# and TypeScript tests

TypeScript tests live in src/test/ and follow the naming pattern *[tT]est.ts.

Code Conventions

  • No semicolons — Prettier is configured with "semi": false
  • Print width is 140 characters
  • Trailing commas are not used ("trailingComma": "none")
  • Arrow function parentheses are avoided when possible ("arrowParens": "avoid")
  • Strict TypeScript — tsconfig.json has "strict": true
  • ESLint config is in eslint.config.js (CommonJS format, not ESM)
  • Markdown line length limit is 120 characters (tables and headings are exempt)
  • Prefer const over let where possible

Repository Structure

src/
  cli.ts              # CLI entry point
  index.ts            # Package entry point
  lib/
    commands/          # Command implementations
    util/              # Utility modules
    validate.ts        # Validation logic
    validators/        # Validator implementations
  test/                # TypeScript tests (Jest)
    specs/             # Test fixture OpenAPI spec files
openapi-diff/          # C#/.NET solution (core diff engine)
docs/                  # Documentation

CI

CI runs on both Ubuntu and Windows via GitHub Actions (.github/workflows/ci.yml). It runs: npm run lint, npm run prettier, and npm test (which includes both C# and TypeScript tests).

Guidelines

  • Run npm run lint and npm run prettier before submitting changes.
  • Add or update tests in src/test/ for any TypeScript code changes.
  • Do not modify CI/CD pipeline files (.github/workflows/, azure-pipelines.yml) unless specifically required.
  • When working only on TypeScript, use npm run ts.test to run just the TypeScript tests.

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.