bicep
Copilot instructions3.6k starsChanged 2 months agoMITView on GitHub
Bicep is a DSL for Azure ARM templates. The compiler pipeline is: Lexer → Parser → Binder → Type Checking / Linting → Emitter (ARM JSON). Key classes: Compilation → SemanticModel → TypeManager, Binder, TemplateEmitter. All use lazy evaluation and caching—the language server recreates state per keystroke, so only compute what's requested. .NET SDK version is pinned in global.json (currently .NET 10). Use VS Code tasks (defined in .vscode/tasks.json) for common operations. Integration test datasets live in src/Bicep.Core.Samples/Files/baselines/. Each dataset…
Trending
Quiet since March.thin dataabout the whole repository
Who's talking about Azure/bicep
- microsoft/azure-container-apps“Feature Request: Websockets and gRPC support are mutually exclusive (ingress transport 'auto' is 'http')”GitHub · Jan 13, 2023 · 9 reactions
- Azure/azure-rest-api-specs“Missing readonly `inboundIpAddress` property from Microsoft.Web/sites type definitions”GitHub · Feb 12, 2021 · 9 reactions
- zed-industries/extensions“Bicep Language Support”GitHub · Dec 9, 2024 · 7 reactions
- Azure/bicep-registry-modules“Disallow generic `object` and array of object parameter types (temporarily)”GitHub · Apr 4, 2022 · 7 reactions
- Azure/bicep-types-az“Microsoft.ManagedIdentity: Improve Federated Credentials Handling Issue with Bicep”GitHub · Feb 1, 2024 · 6 reactions
The biggest 5 of 8 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 8
Talked about on GitHub, Hacker News and Bluesky (8 times).
On GitHub · 6
- Jan 13, 2023Feature Request: Websockets and gRPC support are mutually exclusive (ingress transport 'auto' is 'http') — microsoft/azure-container-apps9 reactions · 11 comments
- Feb 12, 2021Missing readonly `inboundIpAddress` property from Microsoft.Web/sites type definitions — Azure/azure-rest-api-specs9 reactions · 4 comments
- Dec 9, 2024Bicep Language Support — zed-industries/extensions7 reactions
- Apr 4, 2022Disallow generic `object` and array of object parameter types (temporarily) — Azure/bicep-registry-modules7 reactions · 5 comments
- Feb 1, 2024Microsoft.ManagedIdentity: Improve Federated Credentials Handling Issue with Bicep — Azure/bicep-types-az6 reactions · 9 comments
1 more on GitHub
- Aug 30, 2022Please add reconcilePeriodSeconds as an option for cluster add-on — Azure/application-gateway-kubernetes-ingress6 reactions · 3 comments
On Hacker News · 1
On Bluesky · 1
- Mar 15, 2026Today's random GitHub ⭐! Azure/bicep Posted using Starrysky — @alexmg.dev1 likes and repost
In this repositoryOne other file it gives its agents.
- bicep-perf-profilingSkill
The file
We split this copilot-instructions.md into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 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.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 25
Prefer collection expressions ([a, b]) over .ToList() / new List<T>{}
- Very specific: line 51
DI in tests: Use ServiceBuilder for composable test setup: new ServiceBuilder().WithRegistration(...).Build()
- Very specific: line 59
Update baselines: run VS Code task "Update Baselines" or dotnet test -- --filter TestCategory=Baseline --test-parameter SetBaseLine=true
- Distinctive: line 60
Always inspect baseline diffs: before committing—unexplained changes block PRs
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions 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
Bicep Project Guidelines
Architecture
Bicep is a DSL for Azure ARM templates. The compiler pipeline is: Lexer → Parser → Binder → Type Checking / Linting → Emitter (ARM JSON).
| Project | Role |
Bicep.Core | Compiler library (parser, binder, type system, emitter, linter) |
Bicep.Cli | CLI (bicep build, bicep decompile, etc.) |
Bicep.LangServer | OmniSharp-based LSP server |
Bicep.McpServer | Model Context Protocol server for AI tooling |
Bicep.Decompiler | ARM JSON → Bicep decompilation |
vscode-bicep | VS Code extension (TypeScript) |
Key classes: Compilation → SemanticModel → TypeManager, Binder, TemplateEmitter. All use lazy evaluation and caching—the language server recreates state per keystroke, so only compute what's requested.
Code Style
- C#: 4-space indent, braces always required, nullable enabled,
TreatWarningsAsErrors=true - File header required:
// Copyright (c) Microsoft Corporation.+// Licensed under the MIT License. - Null-forgiving
!operator is banned in product code (allowed in tests) Console.Write/Console.WriteLineare banned—use proper logging- Syntax trees and data structures are immutable by default
- Prefer collection expressions (
[a, b]) over.ToList()/new List<T>{} - Line endings:
LF(configured in.editorconfig) - TypeScript/JSON: 2-space indent
Build and Test
# Build
dotnet build Bicep.slnx
# Run all tests
dotnet test
# Build VS Code extension (requires Node.js 22+)
cd src/vscode-bicep && npm ci && npm run build
# Build vscode-bicep-ui
cd src/vscode-bicep-ui && npm ci && npm run build.NET SDK version is pinned in global.json (currently .NET 10). Use VS Code tasks (defined in .vscode/tasks.json) for common operations.
Test Conventions
- Framework: MSTest (
[TestClass],[TestMethod]), FluentAssertions for assertions, Moq for mocking - Naming:
Bicep.Foo.UnitTests,Bicep.Foo.IntegrationTests,Bicep.Foo.E2eTests - DI in tests: Use
ServiceBuilderfor composable test setup:new ServiceBuilder().WithRegistration(...).Build() - Vitest for VS Code extension tests
- Vitest for vscode-bicep-ui tests
Baseline Tests (Critical Pattern)
Integration test datasets live in src/Bicep.Core.Samples/Files/baselines/. Each dataset has main.bicep plus assertion files (.diagnostics, .formatted, .symbols, .syntax, .tokens, .ir, main.json, etc.).
- Update baselines: run VS Code task "Update Baselines" or
dotnet test -- --filter TestCategory=Baseline --test-parameter SetBaseLine=true - Always inspect baseline diffs before committing—unexplained changes block PRs
- Folders prefixed with
Invalidexpect compilation failure
Key Patterns
Diagnostics
Diagnostics are defined centrally in DiagnosticBuilder.DiagnosticBuilderInternal. Pattern:
DiagnosticBuilder.ForPosition(span).SomeError(args)Visitor Pattern
Layered hierarchy: SyntaxVisitor → CstVisitor (tokens/trivia) → AstVisitor (semantic nodes) → SyntaxRewriteVisitor (immutable transforms). Extend AstVisitor for most analysis tasks.
Linter Rules
Extend LinterRuleBase in Bicep.Core/Analyzers/Linter/Rules/. Rules are configurable via bicepconfig.json.
Dependency Injection
Core services registered via AddBicepCore() extension method. MCP server uses AddBicepMcpServer(). MCP tools use [McpServerToolType]/[McpServerTool] attributes.
Project Conventions
- Link issues in PRs (
Fixes #NNN) - Design proposals required for significant changes
- Snippet templates live in
src/Bicep.LangServer/Files/SnippetTemplates/ - Central package management enabled (
src/Directory.Packages.props)—add package versions there, not in individual.csprojfiles
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.

