Add AI-focused usage documentation for package consumers#22
Conversation
Co-authored-by: leeoades <2321091+leeoades@users.noreply.github.com>
Co-authored-by: leeoades <2321091+leeoades@users.noreply.github.com>
.copilot-instructions.md
Outdated
| // 2. Define triggers (abstract record with sealed subtypes) | ||
| public abstract record OrderTrigger | ||
| { | ||
| public sealed record AddItem(string ProductId, int Quantity) : OrderTrigger; |
There was a problem hiding this comment.
No, they don't have to be sealed. Both patterns work:
public record MyTrigger : BaseTrigger✅public sealed record MyTrigger : BaseTrigger✅
The actual samples in the repository (VendingMachine, StockPurchaser) use non-sealed records. Using sealed is a best practice to prevent further inheritance, but it's not a requirement.
Updated the documentation to clarify this and remove the sealed keyword from examples to match the patterns used in the samples. (commit faa6fb0)
.copilot-instructions.md
Outdated
| } | ||
|
|
||
| // 3. Define state data (sealed record) | ||
| public sealed record OrderData( |
There was a problem hiding this comment.
@copilot - does this have to be sealed? I don't think so.
There was a problem hiding this comment.
Correct, it doesn't have to be sealed. Already updated in commit faa6fb0 - the sealed keyword has been removed from OrderData and all other examples to match the patterns used in the actual repository samples.
.copilot-instructions.md
Outdated
| // 4. Define commands (abstract record with sealed subtypes) | ||
| public abstract record OrderCommand | ||
| { | ||
| public sealed record AddToCart(string ProductId) : OrderCommand; |
There was a problem hiding this comment.
No, they don't have to be sealed. Already updated in commit faa6fb0 - removed sealed from all command subtypes to align with the patterns used in repository samples. Both record and sealed record work correctly.
…ypes Co-authored-by: leeoades <2321091+leeoades@users.noreply.github.com>
Add AI-Focused Usage Instructions for FunctionalStateMachine Package
Objective
Create documentation that helps AI coding assistants understand how to effectively use and integrate the FunctionalStateMachine package in external projects.
✅ Completed Implementation
New Documentation Files
.copilot-instructions.md(568 lines, 16KB) - Comprehensive guide at repository rootAI-USAGE-GUIDE.md(258 lines, 7.1KB) - Quick reference included in NuGet packagesdocs/AI-Documentation-Maintenance.md(252 lines, 8KB) - Contributor guideUpdated Files
README.md- Added "Using with AI Coding Assistants" sectionDirectory.Build.props- Configured to include AI-USAGE-GUIDE.md in packagesdocs/index.md- Added links to AI guidesCONTRIBUTING.md- Added AI docs update guidanceRecent Changes
sealedkeyword is optional, not requiredrecordandsealed recordwork correctly✅ Validation Complete
💡 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.