agentleFS
Microsoft AzureKnown publisherAzure/azure-dev/ext/vscode/AGENTS.md

azure-dev / vscode

AGENTS.md573 starsChanged 8 months agoMITView on GitHub

A file for guiding coding agents. IMPORTANT: Always run these checks before committing to avoid pipeline failures: Testing Requirements: - If you modify existing code, ensure related tests still pass - If you add new functionality, add corresponding unit tests - Add new words to .vscode/cspell-dictionary.txt if cspell flags valid technical terms

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 9

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    IMPORTANT: Always run these checks before committing to avoid pipeline failures:

    line 28
  2. Very specific:

    Run npm run lint and fix all issues

    line 30
  3. Very specific:

    Run npx cspell "src//*.ts" --config .vscode/cspell.yaml and fix spelling errors

    line 31
  4. Very specific:

    Run npm run unit-test and ensure all tests pass

    line 32
  5. Distinctive:

    Update README.md if functionality changed

    line 33
  6. Distinctive:

    Verify no merge conflict markers in code

    line 34
  7. Distinctive:

    If you modify existing code, ensure related tests still pass

    line 37
  8. Distinctive:

    If you add new functionality, add corresponding unit tests

    line 38
  9. Very specific:

    Add new words to .vscode/cspell-dictionary.txt if cspell flags valid technical terms

    line 39
  10. Distinctive:

    All TypeScript source files MUST include the Microsoft copyright header:

    line 44
  11. Very specific:

    All user-facing strings shown in the UI, error messages, etc.

    line 51
  12. Very specific:

    All user-facing strings in package.json must be extracted into package.nls.json

    line 52
  13. Very specific:

    Instead of vscode.window.showQuickPick, use IActionContext.ui.showQuickPick

    line 55
  14. Very specific:

    Use ExtensionContext.subscriptions for cleanup

    line 62
  15. Distinctive:

    Use Mocha for test framework

    line 65
  16. Distinctive:

    Use Chai for assertions

    line 66
  17. Distinctive:

    Keep tests focused and isolated

    line 68
  18. Very specific:

    Use UserCancelledError from @microsoft/vscode-azext-utils for testing user cancellation scenarios

    line 69

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md 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
AGENTS.md

Agent Development Guide

A file for guiding coding agents.

Commands

  • Install dependencies: npm install
  • Build: npm run build
  • Lint: npm run lint
  • Spell Check: npx cspell "src/**/*.ts" --config .vscode/cspell.yaml
  • Unit Tests: npm run unit-test
  • Watch mode: npm run watch
  • Package extension: npm run package

Directory Structure

  • Extension entry point: src/extension.ts
  • Commands: src/commands/
  • Language features: src/language/ (IntelliSense, diagnostics, etc.)
  • Views & tree providers: src/views/
  • Utilities: src/utils/
  • Tests: src/test/
  • Constants: src/constants/
  • Services: src/services/

Pre-Commit Checklist

IMPORTANT: Always run these checks before committing to avoid pipeline failures:

  1. Run npm run lint and fix all issues
  2. Run npx cspell "src/**/*.ts" --config .vscode/cspell.yaml and fix spelling errors
  3. Run npm run unit-test and ensure all tests pass
  4. Update README.md if functionality changed
  5. Verify no merge conflict markers in code

Testing Requirements:

  • If you modify existing code, ensure related tests still pass
  • If you add new functionality, add corresponding unit tests
  • Add new words to .vscode/cspell-dictionary.txt if cspell flags valid technical terms

Code Conventions

Copyright Headers

All TypeScript source files MUST include the Microsoft copyright header:

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

Localization

  • All user-facing strings shown in the UI, error messages, etc. must use vscode.l10n.t()
  • All user-facing strings in package.json must be extracted into package.nls.json

UI Best Practices

  • Instead of vscode.window.showQuickPick, use IActionContext.ui.showQuickPick
  • Instead of vscode.window.showInputBox, use IActionContext.ui.showInputBox
  • Same for showWarningMessage, showOpenDialog, and showWorkspaceFolderPick

Resource Management

  • FileSystemWatchers are a scarce resource on some systems - use the shared FileSystemWatcherService
  • Dispose resources properly using vscode.Disposable pattern
  • Use ExtensionContext.subscriptions for cleanup

Testing

  • Use Mocha for test framework
  • Use Chai for assertions
  • Mock VS Code APIs using Sinon
  • Keep tests focused and isolated
  • Use UserCancelledError from @microsoft/vscode-azext-utils for testing user cancellation scenarios

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.