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
- Very specific: line 29
Use import * as name from 'module' style for namespace imports.
- Very specific: line 30
Prefer readonly properties in type definitions and interfaces.
- Very specific: line 35
Test fixtures are subdirectories within src/test/ containing sample readme.md and JSON spec files.
- Distinctive: line 59
All PRs should pass lint, format check, and tests before merging.
- Very specific: line 60
Update CHANGELOG.md when making user-facing changes.
≈ “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.
Files
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"inpackage.json). Use.jsextensions in relative import paths (e.g.import * as err from './errors.js'). - Runtime: Node.js >= 20
- Build:
tsc(TypeScript compiler). Output goes todist/. - 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) ornpm 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
readonlyproperties in type definitions and interfaces. - Error types are defined as discriminated unions in
src/errors.tsusing acodefield. - 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.deepStrictEqualfor comparisons anddescribe/itfrom Vitest. - Test fixtures are subdirectories within
src/test/containing samplereadme.mdand 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 APIsrc/errors.ts– Error type definitionssrc/cli.ts– CLI runner/reporting utilities (yargs setup lives inbin/cli.js)src/dev-ops.ts– Azure DevOps PR integrationsrc/git.ts– Git operationssrc/readme.ts– Readme/markdown parsing utilitiessrc/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.mdwhen making user-facing changes.
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
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.

