dsccommunity / dsccommunity/NetworkingDsc

chore: Add Agentic AI development assets for GitHub Copilot

Open
#542 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

chore
Dominant language
PowerShell
Stars
235
Forks
93
PR merge metrics
No merged PRs in 30d

Description

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 NetworkingDsc-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 NetworkingDsc-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 type — this repository contains MOF-based resources (source/DSCResources/)
  • MOF-based resource structuresource/DSCResources/DSC_<ResourceName>/ containing .psm1, .schema.mof, and localization in en-US/
  • Key conventions — localized strings, DscResource.Common helpers, CHANGELOG updates
  • DSC Community resourcesGuidelines, 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 locationtests/Unit/DSCResources/ for MOF resources
  • Integration test locationtests/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)
    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:


4. .github/instructions/*.instructions.md

Copy the following files from SqlServerDsc .github/instructions/ and adapt as described:

New file Source file Adaptations required
dsc-community-style-guidelines.instructions.md dsc-community-style-guidelines.instructions.md Update file organization for DSCResources layout; remove source/Public/source/Private sections; note MOF-only resource type
dsc-community-style-guidelines-mof-resources.instructions.md dsc-community-style-guidelines-mof-resources.instructions.md Copy as-is — already generic DSC Community content
dsc-community-style-guidelines-pester.instructions.md dsc-community-style-guidelines-pester.instructions.md Copy as-is — fully generic Pester 5 guidelines
dsc-community-style-guidelines-unit-tests.instructions.md dsc-community-style-guidelines-unit-tests.instructions.md Replace {MyModuleName} with NetworkingDsc; update applyTo path to include tests/Unit/DSCResources/; remove SMO references
dsc-community-style-guidelines-integration-tests.instructions.md dsc-community-style-guidelines-integration-tests.instructions.md Replace {MyModuleName} with NetworkingDsc; update resource location path to tests/Integration/; remove SQL Server CI environment notes
dsc-community-style-guidelines-powershell.instructions.md dsc-community-style-guidelines-powershell.instructions.md Copy as-is — fully generic PowerShell style guidelines
dsc-community-style-guidelines-localization.instructions.md dsc-community-style-guidelines-localization.instructions.md Update string file paths for MOF resources: source/DSCResources/DSC_<Name>/en-US/DSC_<Name>.strings.psd1
dsc-community-style-guidelines-changelog.instructions.md dsc-community-style-guidelines-changelog.instructions.md Update repo URL to dsccommunity/NetworkingDsc in issue reference format
dsc-community-style-guidelines-markdown.instructions.md dsc-community-style-guidelines-markdown.instructions.md Copy as-is — fully generic Markdown style guidelines
NetworkingDsc-guidelines.instructions.md SqlServerDsc-guidelines.instructions.md Replace with NetworkingDsc-specific content: build/test workflow, MOF resource naming (DSC_<ResourceName>), no SQL Server or SMO references; applyTo: "**"

Acceptance criteria

  • AGENTS.md created at repository root
  • tests/AGENTS.md created
  • .github/copilot-instructions.md created
  • All 10 .github/instructions/*.instructions.md files created
  • No SQL Server–specific content remains in any file
  • All {MyModuleName} or {owner}/{repo} placeholders replaced with correct values
  • All applyTo globs verified against actual file paths in this repo

References

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the referenced SqlServerDsc files and the NetworkingDsc layout under source/DSCResources/, tests/Unit/, and tests/Integration/. Create AGENTS.md, tests/AGENTS.md, .github/copilot-instructions.md, and the 10 listed instruction files, adapting paths and repository-specific guidance. Done means all acceptance criteria pass, including verified applyTo globs, correct placeholders, and no SQL Server-specific content.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
developer-experience, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.