agentleFS
MicrosoftKnown publishermicrosoft/SharePoint-Embedded-VS-Code-Extension/AGENTS.md

SharePoint-Embedded-VS-Code-Extension

AGENTS.md20 starsChanged 10 days agoMITView on GitHub

This repository is a VS Code extension for managing SharePoint Embedded resources. Its primary surfaces are the extension host under src/, the Storage Explorer React webview under webview-ui/, and Playwright coverage under ui-tests/. These instructions apply to every automated or interactive coding agent working in this repository. More specific instructions may narrow this authority, but must not weaken the safety rules below. Machine-readable worker contracts, role definitions, and authority policies live under .agent/. See .agent/README.md before running a contracted task.

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 31,542 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 repositoryOne other file it gives its agents.

The file

Show its rules and text

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

23 rules. About 1 is common, 13 are distinctive, and 9 are very specific to this project.

  • ≈1

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈13

    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:

    Follow the preferred flow: commands -> services -> Zod schemas.

    line 18
  2. Very specific:

    Add Microsoft Graph operations to src/services/Graph/ and expose them through GraphProvider.

    line 19
  3. Very specific:

    Use AuthenticationState and the existing providers under src/services/Auth/ for sign-in, sign-out, account switching, and token acquisition.

    line 21
  4. Distinctive:

    Keep access tokens in the extension host.

    line 23
  5. Distinctive:

    Treat the extension host/webview message boundary as untrusted.

    line 25
  6. Distinctive:

    Put defaults on create/request schemas when appropriate, not response schemas.

    line 29
  7. Very specific:

    Use vscode.l10n.t(...) for user-facing strings.

    line 31
  8. Very specific:

    Keep tree-item contextValue values aligned with the corresponding package.json menu when clauses.

    line 33
  9. Distinctive:

    Read the relevant command, service, schema, UI, and test paths before editing.

    line 40
  10. Very specific:

    Do not weaken typing with any, unknown casts, or unchecked message payloads when a schema or type guard can represent the data.

    line 46
  11. Distinctive:

    Add or update tests when behavior changes.

    line 48
  12. Very specific:

    Do not commit generated output from out/, dist/, Playwright reports, or dependency folders.

    line 50
  13. Distinctive:

    Run the smallest relevant checks while developing.

    line 54
  14. Very specific:

    Run npm run test:perf only for performance-sensitive changes or when the task contract requires it.

    line 67
  15. Very specific:

    Run npm test when extension-host test coverage exists for the changed behavior or the task contract requires it.

    line 69
  16. Distinctive:

    Do not claim a check passed unless its command completed successfully.

    line 71
  17. Distinctive:

    Do not publish the extension, create releases, deploy, merge pull requests, or push to protected branches.

    line 77
  18. Distinctive:

    Do not access production tenants or create, update, or delete live Microsoft Graph, SharePoint, or Azure resources.

    line 79
  19. Distinctive:

    Do not change authentication scopes, telemetry collection, security boundaries, dependencies, or release configuration without calling out …

    line 81
  20. Common:

    Do not read, print, copy, or persist credentials, tokens, secrets, private keys, or local environment files.

    line 83
  21. Distinctive:

    Do not disable tests, lint rules, validation, permission checks, or security controls to make a change pass.

    line 85
  22. Very specific:

    Do not use blanket permission bypasses such as --allow-all or --yolo.

    line 87
  23. Distinctive:

    Every worker must return a concise, reviewable handoff containing:

    line 94

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

Repository

This repository is a VS Code extension for managing SharePoint Embedded resources. Its primary surfaces are the extension host under src/, the Storage Explorer React webview under webview-ui/, and Playwright coverage under ui-tests/.

These instructions apply to every automated or interactive coding agent working in this repository. More specific instructions may narrow this authority, but must not weaken the safety rules below.

Machine-readable worker contracts, role definitions, and authority policies live under .agent/. See .agent/README.md before running a contracted task.

Architecture

  • Follow the preferred flow: commands -> services -> Zod schemas.
  • Add Microsoft Graph operations to src/services/Graph/ and expose them through GraphProvider; do not create ad hoc Graph clients.
  • Use AuthenticationState and the existing providers under src/services/Auth/ for sign-in, sign-out, account switching, and token acquisition.
  • Keep access tokens in the extension host. Never send them to a webview, write them to disk, include them in telemetry, or log them.
  • Treat the extension host/webview message boundary as untrusted. Use the typed Storage Explorer protocol, validate inputs, allow-list operations, and project results before returning them.
  • Route ARM operations through ARMProvider. Diagnose ARM failures with diagnoseArmError(error) before presenting user-facing errors.
  • Put defaults on create/request schemas when appropriate, not response schemas. Response defaults can silently misclassify service data.
  • Use vscode.l10n.t(...) for user-facing strings.
  • Refresh DevelopmentTreeViewProvider after mutations so VS Code receives fresh tree items.
  • Keep tree-item contextValue values aligned with the corresponding package.json menu when clauses.
  • A new command must be wired through its command file, src/commands/index.ts, src/extension.ts, and the relevant package.json contribution.

Working Rules

  • Read the relevant command, service, schema, UI, and test paths before editing.
  • Reuse existing helpers and patterns before introducing new abstractions.
  • Make bounded changes that satisfy explicit acceptance criteria; do not modify unrelated files.
  • Preserve existing public behavior unless the task explicitly changes it.
  • Throw or surface actionable failures using repository conventions. Do not silently swallow errors or add broad success-shaped fallbacks.
  • Do not weaken typing with any, unknown casts, or unchecked message payloads when a schema or type guard can represent the data.
  • Add or update tests when behavior changes. Derive tests from acceptance criteria and important failure modes, not only from the implementation.
  • Do not commit generated output from out/, dist/, Playwright reports, or dependency folders.

Validation

Run the smallest relevant checks while developing. Before declaring a cross-surface change complete, run:

npx tsc -p ./ --noEmit
npm run lint
npm run build:webview
npm run test:api
npm run test:ui
  • npm run test:api covers Storage Explorer Graph-service request shaping without a browser.
  • npm run test:ui covers the standalone Storage Explorer webview in Chromium.
  • Run npm run test:perf only for performance-sensitive changes or when the task contract requires it.
  • Run npm test when extension-host test coverage exists for the changed behavior or the task contract requires it.
  • Do not claim a check passed unless its command completed successfully.

Authority and Safety

Unless a task contract and a human approval explicitly grant additional authority:

  • Do not publish the extension, create releases, deploy, merge pull requests, or push to protected branches.
  • Do not access production tenants or create, update, or delete live Microsoft Graph, SharePoint, or Azure resources.
  • Do not change authentication scopes, telemetry collection, security boundaries, dependencies, or release configuration without calling out the change for human review.
  • Do not read, print, copy, or persist credentials, tokens, secrets, private keys, or local environment files.
  • Do not disable tests, lint rules, validation, permission checks, or security controls to make a change pass.
  • Do not use blanket permission bypasses such as --allow-all or --yolo.

Instructions describe expected behavior but are not an enforcement boundary. Automated workers must also be constrained by runtime permissions, isolated workspaces, budgets, and approval hooks.

Completion Handoff

Every worker must return a concise, reviewable handoff containing:

  • acceptance criteria satisfied;
  • files changed and the purpose of each logical change;
  • validation commands run and their outcomes;
  • unresolved risks, assumptions, or blocked criteria;
  • any action requiring human approval.

An implementation is not accepted solely because its implementing agent reports success. CI and an independent review context must validate it before final human acceptance.

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.