Skip to content

chore: Add Agentic AI development assets for GitHub Copilot #53

Description

@PlagueHO

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 patternsResourceBase 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 structuresource/Classes/ for the base classes; source/en-US/ for localized strings
  • Key conventions — localized strings, no external DSC-specific dependencies, CHANGELOG updates
  • DSC Community resourcesGuidelines, 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:

New file Source file Adaptations required
dsc-community-style-guidelines.instructions.md dsc-community-style-guidelines.instructions.md Generalize for a class library: source/Classes/ layout; remove resource-module-specific file paths; note this is a base library not a resource module
dsc-community-style-guidelines-class-resource.instructions.md dsc-community-style-guidelines-class-resource.instructions.md Adapt to describe defining ResourceBase itself, not consuming it; note abstract base class patterns
dsc-community-style-guidelines-pester.instructions.md dsc-community-style-guidelines-pester.instructions.md Copy as-is — fully generic
dsc-community-style-guidelines-unit-tests.instructions.md dsc-community-style-guidelines-unit-tests.instructions.md Replace {MyModuleName} with DscResource.Base; applyTo for tests/Unit/Classes/; remove SMO references; add note about running in new session after class changes
dsc-community-style-guidelines-powershell.instructions.md dsc-community-style-guidelines-powershell.instructions.md Copy as-is
dsc-community-style-guidelines-localization.instructions.md dsc-community-style-guidelines-localization.instructions.md Update string file paths: source/en-US/DscResource.Base.strings.psd1
dsc-community-style-guidelines-changelog.instructions.md dsc-community-style-guidelines-changelog.instructions.md Update repo URL to dsccommunity/DscResource.Base
dsc-community-style-guidelines-markdown.instructions.md dsc-community-style-guidelines-markdown.instructions.md Copy as-is
DscResource.Base-guidelines.instructions.md SqlServerDsc-guidelines.instructions.md Replace with DscResource.Base-specific content: build/test workflow; ResourceBase class authoring conventions; breaking change policy; no SQL/SMO; applyTo: "**"

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

  • AGENTS.md created at repository root with library-specific (not resource-module-specific) guidance
  • tests/AGENTS.md created
  • .github/copilot-instructions.md created with breaking-change awareness note
  • All .github/instructions/*.instructions.md files created with no SQL Server–specific or resource-module-specific content
  • applyTo globs verified against actual source paths

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions