Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 1, 2025

Configures .github/copilot-instructions.md to provide context-aware guidance for the repository.

Changes

  • Project context: Overview of Plugin.ByteArrays as a .NET 9.0 library for byte array utilities with support for 60+ type conversions across byte[], ReadOnlySpan<byte>, and ReadOnlyMemory<byte>

  • Development standards:

    • Code organization patterns (partial classes by category: ByteArrayExtensions.*.cs)
    • Naming conventions from .editorconfig (PascalCase types/methods, _camelCase private fields)
    • Method variants: ToType() throws, ToTypeOrDefault() returns default, ref position auto-advances
    • XML documentation requirements for all public APIs
  • Testing patterns: xUnit with FluentAssertions, test naming MethodName_Scenario_ExpectedBehavior, 616+ tests covering success/failure paths and boundary conditions

  • Performance guidance: Prefer ReadOnlySpan<byte> for zero-copy operations, use stackalloc for small buffers, avoid allocations in hot paths

  • Common patterns vs anti-patterns:

    // ✅ Position tracking with auto-advance
    var position = 0;
    var id = buffer.ToInt32(ref position);      // position = 4
    var name = buffer.ToStringUtf8(ref position, 20); // position = 24
    
    // ❌ Manual slicing (inefficient)
    var subset = array.Skip(offset).Take(length).ToArray();
    var value = BitConverter.ToInt32(subset, 0);
  • Commit message format: Conventional Commits guidelines with type, scope, and subject format (e.g., feat(extensions): add ToDecimal conversion method), including common types (feat, fix, docs, style, refactor, perf, test, chore) and formatting rules

  • Build/test/CI: Commands for dotnet restore/build/test, GitHub Actions pipeline with versioning, NuGet publishing, and DocFX documentation deployment

  • Dependencies: All packages from Directory.Packages.props including xUnit 2.9.3, FluentAssertions 7.2.0, .NET 9.0 SDK

  • Fixes ✨ Set up Copilot instructions #13

Original prompt

This section details on the original issue you should resolve

<issue_title>✨ Set up Copilot instructions</issue_title>
<issue_description>Configure instructions for this repository as documented in Best practices for Copilot coding agent in your repository.

This repo is a dotnet project around byte arrays. I have enabled highest code quality checks, so the code needs to be crystal-perfect, tested and documented.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits November 1, 2025 23:09
Co-authored-by: framinosona <2520362+framinosona@users.noreply.github.com>
Co-authored-by: framinosona <2520362+framinosona@users.noreply.github.com>
Copilot AI changed the title [WIP] Set up Copilot instructions for repository Add GitHub Copilot instructions for repository Nov 1, 2025
Copilot AI requested a review from framinosona November 1, 2025 23:14
@framinosona
Copy link
Member

@copilot could you add also that this repo uses conventional commits format ?

Co-authored-by: framinosona <2520362+framinosona@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Nov 1, 2025

@copilot could you add also that this repo uses conventional commits format ?

Added conventional commits format guidelines in commit 2580ca7. The section includes:

  • Commit message structure with type, scope, subject, body, and footer
  • Common types (feat, fix, docs, style, refactor, perf, test, chore)
  • Examples following the pattern used in this repository
  • Guidelines for formatting (lowercase, imperative mood, character limits, breaking changes)

@framinosona framinosona marked this pull request as ready for review November 1, 2025 23:20
Copilot AI review requested due to automatic review settings November 1, 2025 23:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds comprehensive GitHub Copilot instructions for the Plugin.ByteArrays project. The document provides detailed guidance on project structure, coding standards, testing practices, and development workflows.

  • Added a 395-line copilot-instructions.md file covering all aspects of the project
  • Documented technology stack, dependencies, and CI/CD pipeline details
  • Included coding standards, testing guidelines, and performance best practices

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

github-actions bot commented Nov 1, 2025

Test Results

616 tests  ±0   616 ✅ ±0   1s ⏱️ ±0s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 2580ca7. ± Comparison against base commit 5a52d18.

@framinosona framinosona merged commit 892bfda into main Nov 1, 2025
18 of 23 checks passed
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.

✨ Set up Copilot instructions

2 participants