Summary
Add Agentic AI development assets so that GitHub Copilot (agent mode) and other AI coding agents can build, test, and contribute to this repository correctly. As the base class library providing ResourceBase for all DSC Community class-based resources, the guidance here should be completely generalized — no dependency on any specific DSC resource module.
Files to create
1. AGENTS.md (repository root)
- Repository overview — DscResource.Base provides the
ResourceBase PowerShell class that all DSC Community class-based resources inherit from. It also provides CMReason and other shared infrastructure types.
- Key patterns —
ResourceBase abstract class, GetCurrentState(), Modify(), AssertProperties(), NormalizeProperties() override pattern; ExcludeDscProperties; $this.localizedData
- Build & test workflow:
./build.ps1 -Tasks noop # one-time setup per pwsh session
./build.ps1 -Tasks build
Invoke-Pester -Path 'tests/Unit' -Output Detailed
- Source structure —
source/Classes/ for the base classes; source/en-US/ for localized strings
- Key conventions — localized strings, no external DSC-specific dependencies, CHANGELOG updates
- DSC Community resources — Guidelines, Blog Posts
- Never run integration tests locally — CI only
2. tests/AGENTS.md
- Pester 5 syntax required; Pester 4 must not be used
- Key differences:
Should -Invoke, Should -BeTrue, BeforeDiscovery, $PSDefaultParameterValues
- Unit tests:
tests/Unit/Classes/
- Always run tests in a new
pwsh session after modifying class files
- Required
DscResource.Test bootstrap boilerplate
3. .github/copilot-instructions.md
Workspace-level instructions for GitHub Copilot. Must cover:
- Library identity — DscResource.Base, DSC Community, purpose as a base class provider
- ResourceBase pattern — how consuming resource modules use this library
- Always update CHANGELOG.md Unreleased section for every change
- Breaking change awareness — changes to
ResourceBase affect all consuming modules; must be backward-compatible or accompanied by a major version bump
- Key external references:
4. .github/instructions/*.instructions.md
Fully generalized versions of the SqlServerDsc instruction files — no references to any specific DSC resource module:
Note: dsc-community-style-guidelines-mof-resources.instructions.md and dsc-community-style-guidelines-integration-tests.instructions.md are intentionally omitted — this library has no MOF resources and integration tests are not applicable.
Acceptance criteria
References
Summary
Add Agentic AI development assets so that GitHub Copilot (agent mode) and other AI coding agents can build, test, and contribute to this repository correctly. As the base class library providing
ResourceBasefor all DSC Community class-based resources, the guidance here should be completely generalized — no dependency on any specific DSC resource module.Files to create
1.
AGENTS.md(repository root)ResourceBasePowerShell class that all DSC Community class-based resources inherit from. It also providesCMReasonand other shared infrastructure types.ResourceBaseabstract class,GetCurrentState(),Modify(),AssertProperties(),NormalizeProperties()override pattern;ExcludeDscProperties;$this.localizedDatasource/Classes/for the base classes;source/en-US/for localized strings2.
tests/AGENTS.mdShould -Invoke,Should -BeTrue,BeforeDiscovery,$PSDefaultParameterValuestests/Unit/Classes/pwshsession after modifying class filesDscResource.Testbootstrap boilerplate3.
.github/copilot-instructions.mdWorkspace-level instructions for GitHub Copilot. Must cover:
ResourceBaseaffect all consuming modules; must be backward-compatible or accompanied by a major version bump4.
.github/instructions/*.instructions.mdFully generalized versions of the SqlServerDsc instruction files — no references to any specific DSC resource module:
dsc-community-style-guidelines.instructions.mddsc-community-style-guidelines.instructions.mdsource/Classes/layout; remove resource-module-specific file paths; note this is a base library not a resource moduledsc-community-style-guidelines-class-resource.instructions.mddsc-community-style-guidelines-class-resource.instructions.mdResourceBaseitself, not consuming it; note abstract base class patternsdsc-community-style-guidelines-pester.instructions.mddsc-community-style-guidelines-pester.instructions.mddsc-community-style-guidelines-unit-tests.instructions.mddsc-community-style-guidelines-unit-tests.instructions.md{MyModuleName}withDscResource.Base;applyTofortests/Unit/Classes/; remove SMO references; add note about running in new session after class changesdsc-community-style-guidelines-powershell.instructions.mddsc-community-style-guidelines-powershell.instructions.mddsc-community-style-guidelines-localization.instructions.mddsc-community-style-guidelines-localization.instructions.mdsource/en-US/DscResource.Base.strings.psd1dsc-community-style-guidelines-changelog.instructions.mddsc-community-style-guidelines-changelog.instructions.mddsccommunity/DscResource.Basedsc-community-style-guidelines-markdown.instructions.mddsc-community-style-guidelines-markdown.instructions.mdDscResource.Base-guidelines.instructions.mdSqlServerDsc-guidelines.instructions.mdResourceBaseclass authoring conventions; breaking change policy; no SQL/SMO;applyTo: "**"Acceptance criteria
AGENTS.mdcreated at repository root with library-specific (not resource-module-specific) guidancetests/AGENTS.mdcreated.github/copilot-instructions.mdcreated with breaking-change awareness note.github/instructions/*.instructions.mdfiles created with no SQL Server–specific or resource-module-specific contentapplyToglobs verified against actual source pathsReferences