agentleFS
MicrosoftKnown publishermicrosoft/vscode-azurefunctions/AGENTS.md

vscode-azurefunctions

AGENTS.md321 starsChanged 9 days agoMITView on GitHub

TypeScript VS Code extension creates, configures, debugs, deploys, manages local and Azure Function Apps. Use this map to find narrowest owner before editing; matching .github/instructions/*.instructions.md files hold deeper subsystem rules. Trace behavior end-to-end before editing: package.json contribution or API call -> registration -> command/wizard -> shared service/tree model -> refresh/output -> tests. Interactive Azure authentication follows this chain: Functions -> Azure Resources extension -> @microsoft/vscode-azext-azureauth -> vscode.authentication -> built-in Microsoft Authentication provider.

  • 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

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

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Place regression coverage beside nearest suite.

    line 65

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

Azure Functions extension agent guide

TypeScript VS Code extension creates, configures, debugs, deploys, manages local and Azure Function Apps. Use this map to find narrowest owner before editing; matching .github/instructions/*.instructions.md files hold deeper subsystem rules.

Architecture

  • src/extension.ts: activation, shared package initialization, command/provider registration, public API, test API.
  • src/extensionVariables.ts: process-wide state initialized during activation. Prefer action/wizard context over new globals.
  • package.json, package.nls.json: command/view/menu/settings contributions, localized contribution text.
  • src/commands/registerCommands.ts: most azureFunctions.* dispatch.
  • src/commands/**: command orchestration; multi-step flows use AzureWizard.
  • src/tree/**, src/FunctionAppResolver.ts, src/LocalResourceProvider.ts: Azure Resources and workspace tree integration.
  • src/workspace/**, src/funcConfig/**, src/vsCodeConfig/**: discovery, Functions/VS Code configuration.
  • src/funcCoreTools/**, src/templates/**, src/debug/**: Core Tools, templates, local host, debugger behavior.
  • src/utils/azureClients.ts: extension-specific Azure SDK factories.
  • src/vscode-azurefunctions.api.d.ts: public contract. src/testApi.ts: test-only contract.
  • test/**: VS Code extension tests; live/long-running tests use existing environment gates.

Trace behavior end-to-end before editing:

package.json contribution or API call -> registration -> command/wizard -> shared service/tree model -> refresh/output -> tests.

Azure authentication ownership

Interactive Azure authentication follows this chain:

Functions -> Azure Resources extension -> @microsoft/vscode-azext-azureauth -> vscode.authentication -> built-in Microsoft Authentication provider.

  • src/extension.ts acquires the legacy Azure Resources host API (ext.rgApi) and current API (ext.rgApiV2). Azure Resources owns Azure account/subscription selection and supplies authenticated subscription objects; Functions does not implement a separate Azure sign-in provider.
  • src/FunctionAppResolver.ts receives ISubscriptionContext from Azure Resources. src/tree/SubscriptionTreeItem.ts passes the selected subscription to Azure client factories. src/utils/azureClients.ts delegates to shared createAzureClient/createAzureSubscriptionClient, which use the supplied credentials and cloud endpoint.
  • The shared auth package implements account/subscription discovery and session-backed credentials. Its getSessionFromVSCode helper calls vscode.authentication.getSession with the configured provider, resource scopes and tenant. Public Azure uses provider ID microsoft; sovereign/custom clouds use microsoft-sovereign-cloud.
  • Durable Task Scheduler uses the current API's AzureSubscription.authentication: src/tree/durableTaskScheduler/DurableTaskSchedulerClient.ts requests a session through that object rather than creating another credential chain.
  • For sign-in/session failures, trace Azure Resources and the auth package before changing Functions command code. Inspect VS Code's Microsoft Authentication logs (Developer: Show Logs...); check the selected account, tenant, cloud and requested audience without recording tokens or account identifiers. Successful az login does not establish a VS Code Microsoft Authentication session. Explicit CI/federated test providers are separate from this interactive flow.

Command wiring

  • Change command title, visibility, menu, keybinding, setting, activation, or when clause in package.json, package.nls.json.
  • Change command arguments/dispatch in src/commands/registerCommands.ts.
  • Function Host debug-view commands registered in src/debug/registerFunctionHostDebugView.ts.
  • Debug providers, task provider, resolvers, workspace providers, URI handling, APIs registered in src/extension.ts.
  • src/agent/agentIntegration.ts advertises agent-invokable commands, adapts queued wizard input.
  • src/commands/api/**: thin public API adapters; product behavior stays in normal command/service implementations.

Direct command ownership

  • App lifecycle: src/commands/startFunctionApp.ts, stopFunctionApp.ts, restartFunctionApp.ts.
  • Function state/deletion: updateDisabledState.ts, deleteFunction.ts, deleteFunctionApp.ts, deleteNode.ts.
  • Slots/children: createSlot.ts, swapSlot.ts, createChildNode.ts.
  • Navigation/inspection: browseWebsite.ts, openInPortal.ts, viewProperties.ts, openFile.ts.
  • URLs/keys: copyFunctionUrl.ts, getMcpHostKey.ts.
  • Deployment source/history: configureDeploymentSource.ts, src/commands/deployments/**.
  • Core Tools install/update/uninstall: src/funcCoreTools/**.

Convert direct commands to wizard steps when prompts or durable side effects multiply.

Tests

  • test/createFunction/**: templates across languages, runtimes, models, sources.
  • test/project/**: project scaffolding, VS Code initialization.
  • test/nightly/**: gated live-Azure operations.
  • Top-level test/*.test.ts: focused utilities, Core Tools, debugging, settings, parsing, compatibility.
  • test/api.test.ts, test/utils/testApiAccess.ts, src/testApi.ts: bundled extension boundary.
  • test/global.test.ts, test/addParallelSuite.ts, test/utils/**: shared setup, gates, workspaces, contexts, parallel execution.

Place regression coverage beside nearest suite; do not create second harness for behavior already exposed through test API.

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.