bicep-deploy
Copilot instructions64 starsChanged 12 months agoMITView on GitHub
This repository contains the bicep-deploy GitHub Action and the shared @azure/bicep-deploy-common package. Before committing any changes, always run the following commands in order: All four steps must pass before committing. Important: The dist/ folder contains the compiled action code referenced by action.yml (main: dist/index.cjs). This folder must be rebuilt (npm run build) and committed whenever source code changes. The @azure/bicep-deploy-common package is a shared library that provides: - Azure deployment and deployment stack operations - Bicep file compilation - Configuration…
The file
Show its rules and text
We split this copilot-instructions.md into the rules it gives an agent
15 rules. About 0 are common, 6 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
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
- Distinctive: line 7
Before committing any changes, always run the following commands in order:
- Distinctive: line 24
Run all tests: - Ensure all tests pass
- Distinctive: line 29
All four steps must pass before committing.
- Distinctive: line 55
When modifying the common package, remember that changes affect both:
- Very specific: line 62
Run npm test -- --run for a single test run
- Very specific: line 63
Run npm test for watch mode
- Very specific: line 64
Run npm run test:live for live/integration tests (requires Azure credentials, tests in test-live/ folder)
- Distinctive: line 69
When adding new logging to the common package:
- Very specific: line 70
Add the message template to LoggingMessageConfig interface in src/loggingMessages.ts
- Very specific: line 71
Add the default implementation to defaultLoggingMessages
- Distinctive: line 84
When adding new public functions or types to the common package:
- Very specific: line 85
Add exports to packages/bicep-deploy-common/src/index.ts
- Very specific: line 90
Test mocks are in packages/bicep-deploy-common/test/mocks/
- Very specific: line 91
Test fixtures/files are in packages/bicep-deploy-common/test/files/
- Very specific: line 92
Use TestLogger from test/logging.ts for logging assertions in tests
≈ “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 Deploy - Copilot Instructions
This repository contains the bicep-deploy GitHub Action and the shared @azure/bicep-deploy-common package.
Pre-Commit Checklist
Before committing any changes, always run the following commands in order:
- Lint fix - Fix any linting issues
npm run lint -- --fix - Build common package - Build the shared common package
cd packages/bicep-deploy-common && npm run build - Build full repo - Build the main action
cd /path/to/bicep-deploy && npm run build - Run all tests - Ensure all tests pass
npm test -- --run
All four steps must pass before committing.
Repository Structure
src/- GitHub Action source codedist/- Bundled output that GitHub Actions runs (must be committed!)packages/bicep-deploy-common/- Shared library used by both the GitHub Action and the Azure DevOps tasktest/- Tests for the GitHub Actionpackages/bicep-deploy-common/test/- Tests for the common package
Important: The dist/ folder contains the compiled action code referenced by action.yml (main: dist/index.cjs). This folder must be rebuilt (npm run build) and committed whenever source code changes.
Common Package
The @azure/bicep-deploy-common package is a shared library that provides:
- Azure deployment and deployment stack operations
- Bicep file compilation
- Configuration parsing
- Logging and error handling utilities
Published Package: https://www.npmjs.com/package/@azure/bicep-deploy-common
Important: The GitHub Action and ADO Task consume this package differently:
- GitHub Action (this repo): Uses the local file path (
packages/bicep-deploy-common/), not the npm version - Azure DevOps Task (
microsoft/azure-pipelines-tasks): Uses the published npm version with a pinned version inpackage.json(e.g.,"@azure/bicep-deploy-common": "^0.0.3-dev")
When modifying the common package, remember that changes affect both:
- The GitHub Action (this repo) - immediately, via local reference
- The Azure DevOps BicepDeploy task - after publishing a new npm version and updating the version in the task's
package.json
Testing
- Unit tests use Vitest
- Run
npm test -- --runfor a single test run - Run
npm testfor watch mode - Run
npm run test:livefor live/integration tests (requires Azure credentials, tests intest-live/folder) - Live tests are typically run by CI/CD workflows, not locally during development
Adding New Logging Messages
When adding new logging to the common package:
- Add the message template to
LoggingMessageConfiginterface insrc/loggingMessages.ts - Add the default implementation to
defaultLoggingMessages - This pattern allows consumers (GitHub Action, ADO Task) to customize/localize messages. In practice only the ADO Task does this.
- For ADO Task localization, add message keys to the
messagessection intask.json- bothtask.loc.jsonandresources.resjsonare auto-generated fromtask.jsonduring build
Adding New Error Messages
Error messages follow the same pattern as logging messages:
- Add the message template to
ErrorMessageConfiginterface insrc/errorMessages.ts - Add the default implementation to
defaultErrorMessages - Consumers can customize error messages for localization
Exporting New Functions
When adding new public functions or types to the common package:
- Add exports to
packages/bicep-deploy-common/src/index.ts - Rebuild the common package to regenerate type definitions
Test File Structure
- Test mocks are in
packages/bicep-deploy-common/test/mocks/ - Test fixtures/files are in
packages/bicep-deploy-common/test/files/ - Use
TestLoggerfromtest/logging.tsfor logging assertions in tests TestLoggerprovidesgetInfoMessages()andclear()methods for validating log output
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.

