Skip to content

Add comprehensive copilot-instructions.md for enhanced GitHub Copilot assistance#79

Merged
mattleibow merged 2 commits intomainfrom
copilot/fix-78
Jun 13, 2025
Merged

Add comprehensive copilot-instructions.md for enhanced GitHub Copilot assistance#79
mattleibow merged 2 commits intomainfrom
copilot/fix-78

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 13, 2025

This PR adds a comprehensive .github/copilot-instructions.md file to improve GitHub Copilot's understanding of the DeviceRunners repository structure, conventions, and development patterns.

What's Added

The copilot-instructions.md file provides detailed guidance on:

Project Architecture

  • Multi-platform device testing framework supporting Android, iOS, macOS (Catalyst), and Windows
  • Core components overview: DeviceRunners.Core, VisualRunners, XHarness, UITesting, and CLI tools
  • Testing framework integration for Xunit and NUnit with both visual and CLI runners

Development Conventions

  • Platform-specific code organization using Platforms/ folder structure with conditional compilation
  • Service-oriented architecture patterns demonstrated in the CLI tool
  • MVVM patterns for visual runners with ObservableCollection and ICommand usage
  • Command patterns for CLI tools using Spectre.Console

Technical Guidelines

  • .NET 9.0 multi-targeting configuration and MSBuild conventions
  • Coding standards aligned with .editorconfig (tabs for C#, spaces for XML)
  • Testing patterns for device tests, CLI tools, and visual components
  • Build system conventions using Central Package Management and artifacts output

Common Development Scenarios

  • Adding new testing framework support
  • Extending platform capabilities
  • Creating CLI tool commands
  • Implementing MAUI integrations

Example Usage Context

The instructions help Copilot understand patterns like:

// Platform-specific implementations
#if ANDROID
    return Android.App.Application.Context.CacheDir.AbsolutePath;
#elif WINDOWS
    if (IsPackagedApp.Value)
        return Windows.ApplicationModel.Package.Current.InstalledLocation.Path;
#endif

// Service injection patterns
public class PackageService
{
    public Task<bool> IsPackageInstalled(string identity) { }
}

// MVVM patterns for visual runners
public class HomeViewModel : AbstractBaseViewModel
{
    public ObservableCollection<TestAssemblyViewModel> TestAssemblies { get; }
    public ICommand RunEverythingCommand { get; }
}

This will enable GitHub Copilot to provide more accurate suggestions when working with this complex multi-platform testing framework, understanding the project's unique architecture and development patterns.

Fixes #78.


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

Co-authored-by: mattleibow <1096616+mattleibow@users.noreply.github.com>
Copilot AI changed the title [WIP] Add copilot-instructions.md Add comprehensive copilot-instructions.md for enhanced GitHub Copilot assistance Jun 13, 2025
Copilot AI requested a review from mattleibow June 13, 2025 14:49
@mattleibow mattleibow marked this pull request as ready for review June 13, 2025 16:56
@mattleibow mattleibow merged commit decdab7 into main Jun 13, 2025
@mattleibow mattleibow deleted the copilot/fix-78 branch June 13, 2025 16:56
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.

Add copilot-instructions.md

2 participants