agentleFS
MicrosoftKnown publishermicrosoft/powerplatform-vscode/Agents.md

powerplatform-vscode

AGENTS.md278 starsChanged 11 months agoMITView on GitHub

This is the Power Platform VS Code extension that provides tooling for creating, building, and deploying Power Platform solutions, packages, and portals. It integrates the Power Platform CLI (pac) directly into VS Code. - src/client/extension.ts: Main extension entry point - package.json: Extension manifest with commands and contributions - src/client/lib/PacActivityBarUI.ts: Activity bar panels and UI registration - src/client/PortalWebView.ts: Power Pages portal webview management - src/client/pac/PacWrapper.ts: Wrapper for Power Platform CLI commands - src/client/power-pages/actions-hub/ActionsHubTreeDataProvider.ts: Power Pages Actions Hub tree data provider -

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 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.

  • In this repository4 other files it gives its agents.

The file

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    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. Distinctive:

    Use 4 spaces for indentation (no tabs)

    line 53
  2. Very specific:

    No whitespace in parenthesized constructs: for (let i = 0.

    line 56
  3. Distinctive:

    Use whole words when possible

    line 63
  4. Very specific:

    All user-visible strings MUST be externalized using vscode-nls

    line 69
  5. Distinctive:

    Use JSDoc style comments for functions, interfaces, enums, and classes

    line 73
  6. Distinctive:

    Use async/await for asynchronous code

    line 78
  7. Very specific:

    When modifying any localization strings, run npm run translations-export to ensure updates are captured.

    line 79
  8. Very specific:

    Mocha: test framework with describe and it blocks

    line 85
  9. Very specific:

    Use oneDSLoggerWrapper for all telemetry events

    line 120

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

Agents Instructions

Architecture Overview

This is the Power Platform VS Code extension that provides tooling for creating, building, and deploying Power Platform solutions, packages, and portals. It integrates the Power Platform CLI (pac) directly into VS Code.

Key Components

  • Client (src/client/): Main VS Code extension logic, UI components, and Power Pages tooling
  • Server (src/server/): Language servers for HTML/Liquid and YAML files
  • Debugger (src/debugger/): PCF debugging capabilities for Power Platform components
  • Web (src/web/): VS Code for Web support
  • Common (src/common/): Shared utilities, telemetry, and services

Critical Architecture Patterns

  1. PAC CLI Integration: The extension automatically downloads and manages the Power Platform CLI (src/client/lib/CliAcquisition.ts, src/client/pac/PacWrapper.ts)
  2. Multi-Target Build: Uses webpack to build for desktop VS Code, web, and language servers (webpack.config.js)
  3. Telemetry-First: Comprehensive telemetry using OneDSLogger for both desktop and web (src/common/OneDSLoggerTelemetry/)
  4. Service Architecture: Core services in src/common/services/ (ArtemisService, BAPService, PPAPIService)

Development Workflows

Build Commands

  • npm run build or gulp: Full build (uses gulpfile.mjs)
  • npm run compile-web: Build web version only
  • npm run test-desktop-int: Run desktop integration tests
  • npm run test-web-integration: Run web integration tests

Key Files for Extension Development

  • src/client/extension.ts: Main extension entry point
  • package.json: Extension manifest with commands and contributions
  • src/client/lib/PacActivityBarUI.ts: Activity bar panels and UI registration
  • src/client/PortalWebView.ts: Power Pages portal webview management
  • src/client/pac/PacWrapper.ts: Wrapper for Power Platform CLI commands
  • src/client/power-pages/actions-hub/ActionsHubTreeDataProvider.ts: Power Pages Actions Hub tree data provider

PAC CLI Integration Patterns

// Always use PacWrapper for CLI operations
const pacWrapper = new PacWrapper(context);
await pacWrapper.executeCommand(['solution', 'list']);

Coding Guidelines

Indentation & Style

  • Use 4 spaces for indentation (no tabs)
  • Arrow functions => over anonymous functions
  • Curly braces on same line, always use braces for loops/conditionals
  • No whitespace in parenthesized constructs: for (let i = 0; i < 10; i++)

Naming Conventions

  • PascalCase: type names, enum values
  • camelCase: function/method names, property names, local variables
  • UPPER_CASE: constants
  • Use whole words when possible

Strings & Localization

  • "double quotes" for user-facing strings that need localization
  • 'single quotes' for internal strings
  • All user-visible strings MUST be externalized using vscode-nls

Comments

  • Use JSDoc style comments for functions, interfaces, enums, and classes
  • Include parameter descriptions and return types

Workflow

  • Use async/await for asynchronous code
  • When modifying any localization strings, run npm run translations-export to ensure updates are captured.

Testing Patterns

Framework Usage

  • Mocha test framework with describe and it blocks
  • Chai expect assertions (not assert)
  • Sinon for stubs and spies
  • Mock dependencies extensively for unit tests

Test Organization

  • Unit tests: src/*/test/unit/
  • Integration tests: src/*/test/integration/
  • No //Arrange, //Act, //Assert comments

Running Tests

npm run test              # Unit tests
npm run test-desktop-int  # Desktop integration tests
npm run test-web-integration  # Web integration tests

Power Platform Specific Patterns

Power Pages Development

  • Portal files use specific extensions: .copy.html, .custom_javascript.js (see src/common/constants.ts)
  • File system callbacks in src/client/power-pages/fileSystemCallbacks.ts
  • Bootstrap diff functionality for portal template updates

CLI Version Management

  • CLI versions managed in src/client/lib/CliAcquisition.ts
  • Global storage for CLI binaries in VS Code's global storage path
  • Cross-platform support (Windows .exe, Unix executables)

Telemetry Implementation

  • Use oneDSLoggerWrapper for all telemetry events
  • Events defined in src/common/OneDSLoggerTelemetry/telemetryConstants.ts
  • Separate telemetry for desktop vs web experiences

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.