Enforce doc-first protocol, add SGen, modular plugin docs
- Enforced strict documentation-first AI agent protocol in `.github/copilot-instructions.md` (multi-repo, no auto doc edits, explicit consent, [LOADED_DOCS] prefix, [DOCUMENTATION CHECK] on code changes) - Updated solution structure: added `docs` folder to solution items for LLM/AI context - Integrated AyCode SGen (source-generated binary serialization) with forced runtime registration; documented SGen usage and exclusions - Overhauled plugin `README.md` and added modular docs: `SCHEMA.md`, `DOMAIN_MODEL.md`, `MEASUREMENT.md`, `DATA_LAYER.md`, `AI_SERVICES.md`, `SIGNALR_ENDPOINTS.md` - Updated `CLAUDE.md` to require reading copilot instructions first - Switched appsettings connection string to production DB - Minor doc clarifications, corrects, and project file updates
This commit is contained in:
parent
bb08c7ae61
commit
3725b4c2fd
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
||||||
Always read `.github/copilot-instructions.md` first — it is the single source of truth for this repo.
|
CRITICAL: Your FIRST action in every session MUST be reading `.github/copilot-instructions.md`. Execute ALL session-start instructions found there before responding to any user query. It is the single source of truth for this repo.
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
namespace Mango.Nop.Core { public static class AcBinaryForcedInit { public static void ForceRegister() { System.Console.WriteLine("[SGEN TESTING] AcBinaryForcedInit called."); AyCode.Core.Serializers.Generated.AcBinaryGeneratedWritersInit.Register(); } } }
|
||||||
|
|
@ -40,6 +40,12 @@
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Core.Serializers.SourceGenerator\AyCode.Core.Serializers.SourceGenerator.csproj"
|
||||||
|
OutputItemType="Analyzer"
|
||||||
|
ReferenceOutputAssembly="false" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="ExtendedFactories\" />
|
<Folder Include="ExtendedFactories\" />
|
||||||
<Folder Include="ExtendedModels\" />
|
<Folder Include="ExtendedModels\" />
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,8 @@ namespace Nop.Core.Domain.Discounts;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a discount-product mapping class
|
/// Represents a discount-product mapping class
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[AcBinarySerializable(false, true, false, true)]
|
// SGen incompatible: DiscountMapping.Id is readonly (new int Id { get; }) — generated reader cannot set it (CS0200)
|
||||||
|
//[AcBinarySerializable(false, true, false, true)]
|
||||||
public partial class DiscountProductMapping : DiscountMapping
|
public partial class DiscountProductMapping : DiscountMapping
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -89,4 +89,17 @@ Extends AyCode logging infrastructure — for base types see `AyCode.Core/docs/L
|
||||||
- `linq2db` — data access, `[Association]` / `[Table]` attributes
|
- `linq2db` — data access, `[Association]` / `[Table]` attributes
|
||||||
- `Microsoft.AspNetCore.Mvc.NewtonsoftJson` — JSON serialization
|
- `Microsoft.AspNetCore.Mvc.NewtonsoftJson` — JSON serialization
|
||||||
- Binary serialization: `AcBinarySerializer` (see `AyCode.Core/docs/BINARY_FORMAT.md`). SignalR transport: `AcSignalR` (see `AyCode.Core/AyCode.Services/docs/SIGNALR.md`).
|
- Binary serialization: `AcBinarySerializer` (see `AyCode.Core/docs/BINARY_FORMAT.md`). SignalR transport: `AcSignalR` (see `AyCode.Core/AyCode.Services/docs/SIGNALR.md`).
|
||||||
|
- `AyCode.Core.Serializers.SourceGenerator` (ProjectReference, `OutputItemType="Analyzer"`) — compile-time binary serializer. See [`AyCode.Core/docs/BINARY_SOURCE_GEN.md`](../../../../../../Aycode/Source/AyCode.Core/AyCode.Core/docs/BINARY_SOURCE_GEN.md)
|
||||||
- AyCode DLL references: `AyCode.Interfaces`, `AyCode.Core`, `AyCode.Utils`, `AyCode.Entities` (types only, no runtime nopCommerce dependency)
|
- AyCode DLL references: `AyCode.Interfaces`, `AyCode.Core`, `AyCode.Utils`, `AyCode.Entities` (types only, no runtime nopCommerce dependency)
|
||||||
|
|
||||||
|
## AcBinary Source Generator (SGen)
|
||||||
|
|
||||||
|
9 types annotated with `[AcBinarySerializable]`. For general SGen docs see [`AyCode.Core/docs/BINARY_SOURCE_GEN.md`](../../../../../../Aycode/Source/AyCode.Core/AyCode.Core/docs/BINARY_SOURCE_GEN.md).
|
||||||
|
|
||||||
|
Requires `InternalsVisibleTo("Mango.Nop.Core")` in `AyCode.Core/Properties/AssemblyInfo.cs`.
|
||||||
|
|
||||||
|
### Excluded types
|
||||||
|
|
||||||
|
| Type | Reason |
|
||||||
|
|---|---|
|
||||||
|
| `DiscountProductMapping` | Base `DiscountMapping` hides `BaseEntity.Id` with readonly `new int Id { get; }` → CS0200. Uses compiled-expression fallback. |
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue