agentleFS
MicrosoftKnown publishermicrosoft/powerplatform-vscode/src/web/Agents.md

powerplatform-vscode / web

AGENTS.md278 starsChanged 11 months agoMITView on GitHub

This document provides setup, architecture, coding, and testing instructions for the web extension located in src/web. It is designed to help both humans and AI agents contribute effectively. The web extension extends Visual Studio Code for Power Platform scenarios. All source code for the web extension is located in the src/web directory. To build the web extension, run: This will compile the extension and output the necessary files.

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

    Ensure you have Node.js and npm installed.

    line 34
  2. Very specific:

    Arrow functions: Prefer => over anonymous functions.

    line 67
  3. Distinctive:

    Braces: Always use braces for loops/conditionals, on the same line.

    line 68
  4. Distinctive:

    Comments: Use JSDoc style for functions, interfaces, enums, and classes.

    line 71
  5. Distinctive:

    Localization: All user-visible strings must be externalized.

    line 72
  6. Very specific:

    Telemetry: Use oneDSLoggerWrapper for all events, defined in src/common/OneDSLoggerTelemetry/telemetryConstants.ts.

    line 99
  7. Distinctive:

    Follow coding and testing guidelines above.

    line 105
  8. Very specific:

    Ensure your Node.js and npm versions are up to date.

    line 111
  9. Very specific:

    Check for missing dependencies in package.json.

    line 112

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

Web Extension Instructions

This document provides setup, architecture, coding, and testing instructions for the web extension located in src/web. It is designed to help both humans and AI agents contribute effectively.

Table of Contents

  • Overview
  • Architecture
  • Installation
  • Development
  • Folder Structure
  • Coding Guidelines
  • Building the Extension
  • Testing
  • Power Platform Patterns
  • Contributing
  • Troubleshooting

Overview

The web extension extends Visual Studio Code for Power Platform scenarios. All source code for the web extension is located in the src/web directory.

Architecture

  • Client (src/web/client/): Main VS Code web extension logic and UI components.
  • Common (src/common/): Shared utilities, telemetry, and services.
  • Multi-Target Build: Uses webpack for desktop, web, and language servers.
  • Telemetry: Uses OneDSLogger for web telemetry (src/common/OneDSLoggerTelemetry/).
  • Service Architecture: Core services in src/common/services/.
  • Entrypoint: src/web/client/extension.ts is the main entry point for the web extension.

Installation

  1. Ensure you have Node.js and npm installed.
  2. Navigate to the project root directory:

    cd /path/to/powerplatform-vscode
  3. Install dependencies:

    npm install

Development

  • Main code for the web extension is inside src/web/client/.
  • Open the project in Visual Studio Code.
  • Make changes in the src/web/client/ directory as needed.
  • For CLI operations, use the PacWrapper abstraction.

Folder Structure

src/
└── web/
    └── client/
  • client/: Contains the client-side code for the web extension.

Coding Guidelines

  • Indentation: 4 spaces, no tabs.
  • Arrow functions: Prefer => over anonymous functions.
  • Braces: Always use braces for loops/conditionals, on the same line.
  • Naming: PascalCase for types/enums, camelCase for functions/properties/variables, UPPER_CASE for constants.
  • Strings: "double quotes" for user-facing strings (externalized via vscode-nls), 'single quotes' for internal strings.
  • Comments: Use JSDoc style for functions, interfaces, enums, and classes.
  • Localization: All user-visible strings must be externalized.

Building the Extension

To build the web extension, run:

gulp ci

This will compile the extension and output the necessary files.

Testing

  • Unit tests: Located in src/web/client/test/unit/
  • Integration tests: Located in src/web/client/test/integration/
  • Frameworks: Mocha (describe/it), Chai (expect), Sinon (stubs/spies)
  • Running tests:

    npm run test-web-integration
  • Mock dependencies extensively for unit tests.

Power Platform Patterns

  • Telemetry: Use oneDSLoggerWrapper for all events, defined in src/common/OneDSLoggerTelemetry/telemetryConstants.ts.

Contributing

  1. Fork the repository and create a new branch for your feature or bugfix.
  2. Make your changes in src/web/client/ and, if needed, in src/common/ for shared utilities and services which can be used across web and desktop.
  3. Follow coding and testing guidelines above.
  4. Submit a pull request with a clear description of your changes.
  5. The main difference between web and desktop extension is that desktop extension runs in a Node.js environment, while the web extension runs in a browser-like environment. This affects how certain APIs and modules can be used.

Troubleshooting

  • Ensure your Node.js and npm versions are up to date.
  • Check for missing dependencies in package.json.
  • Review error messages in the terminal for guidance.
  • For build/test issues, consult architecture and coding guidelines above.

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.