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.
- Agents.mdAGENTS.md
- src/client/Agents.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- fix-dependabot-alertsSkill
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
- Very specific: line 34
Ensure you have Node.js and npm installed.
- Very specific: line 67
Arrow functions: Prefer => over anonymous functions.
- Distinctive: line 68
Braces: Always use braces for loops/conditionals, on the same line.
- Distinctive: line 71
Comments: Use JSDoc style for functions, interfaces, enums, and classes.
- Distinctive: line 72
Localization: All user-visible strings must be externalized.
- Very specific: line 99
Telemetry: Use oneDSLoggerWrapper for all events, defined in src/common/OneDSLoggerTelemetry/telemetryConstants.ts.
- Distinctive: line 105
Follow coding and testing guidelines above.
- Very specific: line 111
Ensure your Node.js and npm versions are up to date.
- Very specific: line 112
Check for missing dependencies in package.json.
≈ “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.
Files
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.tsis the main entry point for the web extension.
Installation
- Ensure you have Node.js and npm installed.
Navigate to the project root directory:
cd /path/to/powerplatform-vscodeInstall 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
PacWrapperabstraction.
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 ciThis 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
oneDSLoggerWrapperfor all events, defined insrc/common/OneDSLoggerTelemetry/telemetryConstants.ts.
Contributing
- Fork the repository and create a new branch for your feature or bugfix.
- Make your changes in
src/web/client/and, if needed, insrc/common/for shared utilities and services which can be used across web and desktop. - Follow coding and testing guidelines above.
- Submit a pull request with a clear description of your changes.
- 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.
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.

