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

avocado

Copilot instructions23 starsChanged 9 months agoMITView on GitHub

Avocado (*A*nother *V*alidator *o*f *O*penAPI spec repository *C*onfiguration *A*nd *Directo*ries) is a Node.js CLI tool and library that validates the folder structure and configuration of Azure OpenAPI specification repositories (e.g. Azure/azure-rest-api-specs). It is published as @azure/avocado on npm. Key source files: - src/index.ts – Main validation logic and public API - src/errors.ts – Error type definitions - src/cli.ts – CLI runner/reporting utilities (yargs setup lives in bin/cli.js) - src/dev-ops.ts – Azure DevOps PR integration - src/git.ts – Git operations -…

  • Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.

    Of the Copilot instructions files we read, the 2,336 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

The file

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    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. Very specific:

    Use import * as name from 'module' style for namespace imports.

    line 29
  2. Very specific:

    Prefer readonly properties in type definitions and interfaces.

    line 30
  3. Very specific:

    Test fixtures are subdirectories within src/test/ containing sample readme.md and JSON spec files.

    line 35
  4. Distinctive:

    All PRs should pass lint, format check, and tests before merging.

    line 59
  5. Very specific:

    Update CHANGELOG.md when making user-facing changes.

    line 60

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

Copilot Instructions for Avocado

Project Overview

Avocado (Another Validator of OpenAPI spec repository Configuration And Directories) is a Node.js CLI tool and library that validates the folder structure and configuration of Azure OpenAPI specification repositories (e.g. Azure/azure-rest-api-specs). It is published as @azure/avocado on npm.

Tech Stack

  • Language: TypeScript (strict mode)
  • Module system: ESM ("type": "module" in package.json). Use .js extensions in relative import paths (e.g. import * as err from './errors.js').
  • Runtime: Node.js >= 20
  • Build: tsc (TypeScript compiler). Output goes to dist/.
  • Test framework: Vitest. Test files live in src/test/ and use the naming pattern *-test.ts (not *.test.ts).
  • Linter: ESLint (flat config in eslint.config.js)
  • Formatter: Prettier (config in .prettierrc) — no semicolons, single quotes, 120 char print width, trailing commas

Common Commands

  • Install dependencies: npm ci
  • Build: npm run build
  • Lint: npm run lint
  • Check formatting: npm run format:check
  • Auto-format: npm run format
  • Run tests: npm test (watch mode) or npm run test:ci (single run with coverage)

Coding Conventions

  • Source files use the copyright header: // Copyright (c) Microsoft Corporation. All rights reserved. followed by // Licensed under the MIT License. See LICENSE in the project root for license information.
  • Use import * as name from 'module' style for namespace imports. Named imports are also used where appropriate.
  • Prefer readonly properties in type definitions and interfaces.
  • Error types are defined as discriminated unions in src/errors.ts using a code field.
  • Async iteration is used extensively via @ts-common/async-iterator (asyncIt) for streaming validation results.
  • Synchronous iteration helpers come from @ts-common/iterator.
  • Tests use assert.deepStrictEqual for comparisons and describe/it from Vitest.
  • Test fixtures are subdirectories within src/test/ containing sample readme.md and JSON spec files.

Project Structure

src/           – TypeScript source files
src/test/      – Test files (*-test.ts) and test fixture directories
bin/cli.js     – CLI entry point
dist/          – Compiled output (git-ignored)

Key source files:

  • src/index.ts – Main validation logic and public API
  • src/errors.ts – Error type definitions
  • src/cli.ts – CLI runner/reporting utilities (yargs setup lives in bin/cli.js)
  • src/dev-ops.ts – Azure DevOps PR integration
  • src/git.ts – Git operations
  • src/readme.ts – Readme/markdown parsing utilities
  • src/docs.ts – Swagger file listing for docs pipeline

PR and CI Guidelines

  • CI runs on GitHub Actions (.github/workflows/test.yaml) on Ubuntu (Node 20) and Windows (Node 24).
  • CI steps: install → build → lint → format check → test with coverage.
  • All PRs should pass lint, format check, and tests before merging.
  • Update CHANGELOG.md when making user-facing changes.

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.