Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 22, 2025

This PR adds a comprehensive .github/copilot-instructions.md file that follows the proven structure and best practices from the ASP.NET Core repository, providing GitHub Copilot coding agents with essential guidance for working effectively in the ManagedCode.Communication repository.

Key Features

Follows ASP.NET Core Structure

  • General guidelines section with high-level coding principles
  • Project-specific .NET environment requirements (.NET 9.0, C# 13)
  • Simple build commands: dotnet build and dotnet test
  • Concise formatting rules that reference .editorconfig instead of duplicating content
  • Specific nullable reference types guidance with clear patterns

Testing and Development Integration

  • xUnit + FluentAssertions testing patterns matching actual project conventions
  • Clear test naming patterns: Method_Scenario_ExpectedResult()
  • Code style guidelines aligned with project standards

Result Pattern Focus

  • Essential Result pattern concepts and railway-oriented programming
  • DO/DON'T examples specific to Result types and error handling
  • Framework integration guidance for ASP.NET Core and Orleans
  • Performance considerations for struct-based Result types

The instructions are actionable and concise while maintaining comprehensive coverage of the project's unique Result pattern architecture and development workflow.

Fixes #42.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits August 22, 2025 20:34
Co-authored-by: KSemenenko <4385716+KSemenenko@users.noreply.github.com>
…ands and scenarios

Co-authored-by: KSemenenko <4385716+KSemenenko@users.noreply.github.com>
Copilot AI changed the title [WIP] ✨ Set up Copilot instructions Add comprehensive GitHub Copilot instructions for ManagedCode.Communication repository Aug 22, 2025
Copilot AI requested a review from KSemenenko August 22, 2025 20:39
@KSemenenko
Copy link
Member

@copilot you have to remove all files you created except md one, next I see a lot of irrelevant text and instruction. About tests, benchmarks and random stuff

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

Copilot AI commented Aug 22, 2025

@copilot you have to remove all files you created except md one, next I see a lot of irrelevant text and instruction. About tests, benchmarks and random stuff

Done! I've removed all the extra files (dotnet-install.sh, test results) and simplified the copilot-instructions.md by removing the verbose testing scenarios, benchmark instructions, and detailed troubleshooting sections. The file now focuses on essential build commands, project structure, and core Result type concepts. (commit 23611d2)

Copilot AI changed the title Add comprehensive GitHub Copilot instructions for ManagedCode.Communication repository Add simplified GitHub Copilot instructions for ManagedCode.Communication repository Aug 22, 2025
@KSemenenko
Copy link
Member

@copilot you did totally wrong. Remove all this dotnet installation stuff p. No pep me need it. But return important information about project

…t information

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

Copilot AI commented Aug 22, 2025

@copilot you did totally wrong. Remove all this dotnet installation stuff p. No pep me need it. But return important information about project

Removed all dotnet installation instructions and focused on important project information including core Result types, railway-oriented programming concepts, and project structure. (commit 71a0936)

Copilot AI changed the title Add simplified GitHub Copilot instructions for ManagedCode.Communication repository Add concise GitHub Copilot instructions for ManagedCode.Communication repository Aug 22, 2025
@KSemenenko
Copy link
Member

@copilot this is not enough, where are best practices? All this stuff from recommendation you read about? Code style? Copilot instructions?

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

Copilot AI commented Aug 22, 2025

@copilot this is not enough, where are best practices? All this stuff from recommendation you read about? Code style? Copilot instructions?

Enhanced copilot-instructions.md with comprehensive best practices, code style guidelines, and Copilot-specific instructions including:

• Code style & conventions from .editorconfig (.NET 9.0, 4 spaces, braces on new lines, var usage, naming conventions)
• Testing patterns (xUnit + FluentAssertions, Arrange-Act-Assert structure)
• Best practices with DO/DON'T examples for Result pattern usage, railway-oriented programming, and error handling
• Framework integration guides (ASP.NET Core, Orleans, Command pattern)
• Common patterns (validation, error recovery, result aggregation)
• Performance guidelines (struct usage, avoiding boxing)

The file now provides exactly what GitHub Copilot needs to understand the project architecture and coding conventions. (commit 4f4f21a)

Copilot AI changed the title Add concise GitHub Copilot instructions for ManagedCode.Communication repository Add comprehensive GitHub Copilot instructions with best practices and code style for ManagedCode.Communication Aug 22, 2025
@KSemenenko
Copy link
Member

@copilot this is better, but still not ideal, can you check https://github.com/dotnet/aspnetcore/blob/main/.github/copilot-instructions.md this? Maybe we can improve ours? Also search in internet bet practices for this copilot-instructions.md ?

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

Copilot AI commented Aug 22, 2025

@copilot this is better, but still not ideal, can you check https://github.com/dotnet/aspnetcore/blob/main/.github/copilot-instructions.md this? Maybe we can improve ours? Also search in internet bet...

Improved the copilot-instructions.md by following the ASP.NET Core repository structure and best practices. The file is now more concise and actionable, with:

• General guidelines section with high-level guidance
• .NET environment setup for .NET 9.0 requirements
• Project-specific build/test commands
• Formatting that references .editorconfig instead of repeating rules
• Specific nullable reference types guidance
• Focused testing patterns with actual project conventions
• Essential Result pattern information with clear examples
• Framework integration guidance for ASP.NET Core and Orleans

The structure now follows proven patterns from successful open-source projects while maintaining focus on the Result pattern architecture. (commit f7c2b5e)

Copilot AI changed the title Add comprehensive GitHub Copilot instructions with best practices and code style for ManagedCode.Communication Add comprehensive GitHub Copilot instructions following ASP.NET Core best practices Aug 22, 2025

```bash
# Requires .NET 9.0 SDK
dotnet build ManagedCode.Communication.Tests/Tests.ManagedCode.Communication.sln
Copy link
Member

Choose a reason for hiding this comment

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

Dotnet build and dotnet test and this is all @copilot

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Simplified the build commands to just dotnet build and dotnet test as requested, removing the SDK requirements comment and specific solution file paths.

@KSemenenko
Copy link
Member

@copilot revieew this file one more time, you can do much better and check project to be consistent

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

Copilot AI commented Aug 22, 2025

@copilot revieew this file one more time, you can do much better and check project to be consistent

I've reviewed and improved the copilot-instructions.md file to be more consistent with the project:

• Removed SDK installation details (following ASP.NET Core pattern)
• Fixed railway-oriented programming method order (Map → Then → Compensate)
• Removed reference to non-existent global.json file
• Ensured alignment with actual project structure and testing conventions

The file now follows proven patterns from successful open-source projects while staying focused on the Result pattern architecture. (commit 4d0c5d3)

@KSemenenko
Copy link
Member

@copilot check code one mor time result.IsSuccess.Should().BeTrue();
result.IsFailed.Should().BeFalse();
result.Problem.Should().BeNull(); this is not corect pulll latest main into this branch and check one more time all code

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

Copilot AI commented Aug 23, 2025

@copilot check code one mor time result.IsSuccess.Should().BeTrue();
result.IsFailed.Should().BeFalse();
result.Problem.Should().BeNull(); this is not corect pulll latest main into this b...

Fixed the test example to match the actual project code style. The FluentAssertions are now written in the multi-line format consistent with the actual test files in the repository. (commit 27b5e0e)

@KSemenenko KSemenenko marked this pull request as ready for review August 23, 2025 09:52
Copilot AI review requested due to automatic review settings August 23, 2025 09:52
@KSemenenko KSemenenko merged commit 08a7874 into main Aug 23, 2025
2 checks passed
@KSemenenko KSemenenko deleted the copilot/fix-42 branch August 23, 2025 09:52
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