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 — following DSC Community conventions and ComputerManagementDsc-specific patterns.
The reference implementation is SqlServerDsc, which has a mature set of GitHub Copilot instruction files. Most files can be copied from there and adapted by removing SQL Server-specific content and substituting ComputerManagementDsc-specific details.
Files to create
1. AGENTS.md (repository root)
Top-level guidance for AI agents. Must cover:
- Repository overview — purpose of the module, supported Windows versions, DSC engine versions
- Build & test workflow — how to set up the environment, build, and run tests (see build commands below)
- Resource types present — this repository contains both MOF-based resources (
source/DSCResources/) and class-based resources (source/Classes/); agents must know which pattern applies where
- MOF-based resource structure —
source/DSCResources/DSC_<ResourceName>/ containing .psm1, .schema.mof, and localization in en-US/
- Class-based resource structure —
source/Classes/<DependencyGroupNumber>.<ClassName>.ps1, inheriting from ResourceBase (DscResource.Base)
- Key conventions — localized strings,
DscResource.Common helpers, CHANGELOG updates
- DSC Community resources — Guidelines, Blog Posts
- Build commands:
# One-time setup per pwsh session
./build.ps1 -Tasks noop
# Build
./build.ps1 -Tasks build
# Run unit tests
Invoke-Pester -Path 'tests/Unit' -Output Detailed
# Run a specific test file
Invoke-Pester -Path 'tests/Unit/DSCResources/DSC_<ResourceName>.Tests.ps1' -Output Detailed
- Never run integration tests locally — integration tests require a full Windows environment and run only in CI
2. tests/AGENTS.md (tests folder)
Focused guidance for the tests/ directory. Must cover:
- Test framework — Pester 5 syntax is required; Pester 4 syntax must not be used
- Pester 4 vs Pester 5 structural differences — key syntax changes agents must know:
Describe/Context/It/BeforeAll/AfterAll/BeforeEach/AfterEach — PascalCase
- No
Assert-MockCalled → use Should -Invoke
- No
Should -Be $true → use Should -BeTrue
BeforeDiscovery for test case data instead of script-level variables
$PSDefaultParameterValues pattern for Mock:ModuleName, Should:ModuleName, InModuleScope:ModuleName
- Unit test location —
tests/Unit/DSCResources/ for MOF resources, tests/Unit/Classes/ for class-based resources
- Integration test location —
tests/Integration/ (one config file + one test file per resource)
- Required setup block — exact boilerplate for
BeforeDiscovery/BeforeAll/AfterAll including DscResource.Test module bootstrap
- Running unit tests:
# All unit tests (new pwsh session recommended after class changes)
Invoke-Pester -Path 'tests/Unit' -Output Detailed
# Single resource
Invoke-Pester -Path 'tests/Unit/DSCResources/DSC_<ResourceName>.Tests.ps1' -Output Detailed
- Running integration tests — CI only; not to be run locally unless explicitly instructed
3. .github/copilot-instructions.md
Workspace-level instructions loaded automatically by GitHub Copilot. Must cover:
- Module identity — ComputerManagementDsc, DSC Community, purpose
- Always update CHANGELOG.md Unreleased section for every change
- Resource development best practices (brief; details in
.github/instructions/ files)
- Both resource types — MOF-based (
source/DSCResources/) and class-based (source/Classes/)
- Mandatory reading — point agents at the instruction files below
- Key external references:
4. .github/instructions/*.instructions.md
Copy the following files from SqlServerDsc .github/instructions/ and adapt as described:
ComputerManagementDsc-guidelines.instructions.md content
This is the repo-specific file replacing SqlServerDsc-guidelines.instructions.md. It should cover:
- Build & test workflow — same
./build.ps1 commands as in AGENTS.md
- Naming conventions:
- MOF-based resources:
DSC_<ResourceName> prefix on all files and functions
- Class-based resources: PascalCase class name, file prefix
<DependencyGroupNumber>.<ClassName>.ps1
- Resource type selection — new resources should prefer class-based unless there is a specific reason for MOF-based
- No SQL Server or SMO references
applyTo: "**" (applies globally, like the SqlServerDsc equivalent)
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 — following DSC Community conventions and ComputerManagementDsc-specific patterns.
The reference implementation is SqlServerDsc, which has a mature set of GitHub Copilot instruction files. Most files can be copied from there and adapted by removing SQL Server-specific content and substituting ComputerManagementDsc-specific details.
Files to create
1.
AGENTS.md(repository root)Top-level guidance for AI agents. Must cover:
source/DSCResources/) and class-based resources (source/Classes/); agents must know which pattern applies wheresource/DSCResources/DSC_<ResourceName>/containing.psm1,.schema.mof, and localization inen-US/source/Classes/<DependencyGroupNumber>.<ClassName>.ps1, inheriting fromResourceBase(DscResource.Base)DscResource.Commonhelpers, CHANGELOG updates2.
tests/AGENTS.md(tests folder)Focused guidance for the
tests/directory. Must cover:Describe/Context/It/BeforeAll/AfterAll/BeforeEach/AfterEach— PascalCaseAssert-MockCalled→ useShould -InvokeShould -Be $true→ useShould -BeTrueBeforeDiscoveryfor test case data instead of script-level variables$PSDefaultParameterValuespattern forMock:ModuleName,Should:ModuleName,InModuleScope:ModuleNametests/Unit/DSCResources/for MOF resources,tests/Unit/Classes/for class-based resourcestests/Integration/(one config file + one test file per resource)BeforeDiscovery/BeforeAll/AfterAllincludingDscResource.Testmodule bootstrap3.
.github/copilot-instructions.mdWorkspace-level instructions loaded automatically by GitHub Copilot. Must cover:
.github/instructions/files)source/DSCResources/) and class-based (source/Classes/)4.
.github/instructions/*.instructions.mdCopy the following files from SqlServerDsc
.github/instructions/and adapt as described:dsc-community-style-guidelines.instructions.mddsc-community-style-guidelines.instructions.mdsource/Publicandsource/Privatesections (not used here); note both MOF and class resource typesdsc-community-style-guidelines-mof-resources.instructions.mddsc-community-style-guidelines-mof-resources.instructions.mddsc-community-style-guidelines-class-resource.instructions.mddsc-community-style-guidelines-class-resource.instructions.mdapplyToglob matchessource/Classes/**/*.ps1dsc-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}placeholder withComputerManagementDsc; updateapplyTopath to includetests/Unit/DSCResources/andtests/Unit/Classes/; remove SMO stub type referencesdsc-community-style-guidelines-integration-tests.instructions.mddsc-community-style-guidelines-integration-tests.instructions.md{MyModuleName}withComputerManagementDsc; update resource location path totests/Integration/(flat, notCommands//Resources/subfolders); remove SQL Server CI environment notesdsc-community-style-guidelines-powershell.instructions.mddsc-community-style-guidelines-powershell.instructions.mddsc-community-style-guidelines-localization.instructions.mddsc-community-style-guidelines-localization.instructions.mdsource/DSCResources/DSC_<Name>/en-US/DSC_<Name>.strings.psd1; module-level strings insource/en-US/ComputerManagementDsc.strings.psd1; update PREFIX convention examplesdsc-community-style-guidelines-changelog.instructions.mddsc-community-style-guidelines-changelog.instructions.mddsccommunity/ComputerManagementDscin issue reference formatdsc-community-style-guidelines-markdown.instructions.mddsc-community-style-guidelines-markdown.instructions.mdComputerManagementDsc-guidelines.instructions.mdSqlServerDsc-guidelines.instructions.mdComputerManagementDsc-guidelines.instructions.mdcontentThis is the repo-specific file replacing
SqlServerDsc-guidelines.instructions.md. It should cover:./build.ps1commands as inAGENTS.mdDSC_<ResourceName>prefix on all files and functions<DependencyGroupNumber>.<ClassName>.ps1applyTo: "**"(applies globally, like the SqlServerDsc equivalent)Acceptance criteria
AGENTS.mdcreated at repository roottests/AGENTS.mdcreated.github/copilot-instructions.mdcreated.github/instructions/*.instructions.mdfiles created{MyModuleName}or{owner}/{repo}placeholders replaced with correct valuesapplyToglobs verified against actual file paths in this repoReferences