Skip to content

🩹 [Patch]: Create comprehensive GitHub Copilot instruction file #179

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Jul 6, 2025

This PR adds a comprehensive GitHub Copilot instruction file to help contributors and users better understand the Process-PSModule framework conventions, coding standards, and project structure.

What was added

Created .github/copilot-instructions.md with detailed guidance covering:

Repository Understanding

  • Process-PSModule overview - Purpose as a reusable workflow for PowerShell module development
  • Workflow pipeline - 11-stage CI/CD process from settings to publishing
  • Multi-OS testing - Linux, macOS, Windows support with matrix strategies

PowerShell Development Standards

  • Code structure - Standard directory layout (src/functions/public/, src/functions/private/, etc.)
  • Function patterns - Complete template with comment-based help, parameters, and error handling
  • Code style - Based on PSScriptAnalyzer configuration (4-space indent, 150-char lines, bracing style)

Testing & Quality

  • Pester test structure - Arrange/Act/Assert patterns with proper context organization
  • Test file organization - Unit vs integration tests, naming conventions
  • Code coverage - Target requirements and reporting

Documentation & Configuration

  • Comment-based help - Required sections (.SYNOPSIS, .DESCRIPTION, .PARAMETER, .EXAMPLE)
  • PSModule.yml configuration - Complete structure with skip options and publishing settings
  • Markdown documentation - Standards for function and project documentation

Development Patterns

  • Module requirements - #Requires statements for dependencies
  • Alias definitions - Multiple supported patterns for function aliases
  • PSScriptAnalyzer suppressions - Proper format with justifications
  • Parameter validation - Common validation patterns and attributes

Workflow Integration

  • GitHub Actions patterns - Input/output structure, secrets management
  • Conditional execution - How tests and builds are skipped based on configuration
  • Publishing flow - PowerShell Gallery and GitHub Pages deployment

Benefits for Contributors

This instruction file will enable GitHub Copilot to:

  • Generate PowerShell functions following PSModule framework conventions
  • Create proper Pester tests with correct structure and organization
  • Suggest appropriate documentation and comment-based help
  • Understand the build/test/publish workflow requirements
  • Follow established coding standards automatically
  • Provide context-aware suggestions for configuration files

The 973-word instruction file with 22 detailed sections provides comprehensive coverage of all aspects needed for successful contribution to PowerShell modules using the PSModule framework.

Fixes #178.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@Copilot Copilot AI changed the title [WIP] 🩹 [Patch]: Analyze the code base and create a instruction file for copilot 🩹 [Patch]: Create comprehensive GitHub Copilot instruction file Jul 6, 2025
@Copilot Copilot AI requested a review from MariusStorhaug July 6, 2025 06:57
Copilot finished work on behalf of MariusStorhaug July 6, 2025 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🩹 [Patch]: Analyze the code base and create a instruction file for copilot
2 participants