Add .github/copilot-instructions.md for Copilot cloud agent onboarding#112
Add .github/copilot-instructions.md for Copilot cloud agent onboarding#112Copilot wants to merge 1 commit into
Conversation
…boarding Agent-Logs-Url: https://github.com/stoiveyp/Slack.NetStandard/sessions/b6795766-7713-45aa-96ca-cdc34324a768 Co-authored-by: stoiveyp <147125+stoiveyp@users.noreply.github.com>
|
|
||
| - **Treat warnings as errors**: Any new compiler warning will break the build. Always resolve analyzer and compiler warnings before committing. | ||
| - **Use `NullValueHandling.Ignore`** on every optional JSON property or Slack's strict field presence rules may cause unexpected serialisation behaviour. | ||
| - **Do not use `System.Text.Json`**: The entire library depends on Newtonsoft.Json conventions and custom converters. |
There was a problem hiding this comment.
Hi !
Why not to use System.Text.Json ?
Cheers
There was a problem hiding this comment.
The converters and attributes in this library are based on Newtonsoft, if the agent built anything using System.Text.Json then the output wouldn't work with the rest of the library and the serialized/deserialised output would be incorrect.
Originally this was because the early versions of System.Text.Json didn't support polymorphism and their interface support was poor, so it was necessary for things like the block converters. Now it's a large piece of work for little reward.
Copilot did a good first run of this, I need the rules I've created in Roslyn to be taken into account, and some of the response patterns to be written up, then this would be a good starting context for an agent to take the Slack update from the changelog and attempt a pull request which could then be tweaked - reducing overall time to stay as up to date as possible.
Adds a
copilot-instructions.mdto give Copilot cloud agents enough context about this repo to work efficiently from first contact.What's documented
dotnetinvocations, target frameworks, warnings-as-errors enforcementSlackWebApiClientfacade, lazy-init API group pattern,IWebApiClienttransport abstraction, Request/Response conventionsSystem.Text.Json),NullValueHandling.Ignoreon optional props, one-class-per-fileUtilityassertion methods and fixture naming conventions (Web_,Events_,Blocks_, etc.)