diff --git a/Nop.Plugin.Misc.AIPlugin/.github/copilot-instructions.md b/Nop.Plugin.Misc.AIPlugin/.github/copilot-instructions.md index e69de29..573e020 100644 --- a/Nop.Plugin.Misc.AIPlugin/.github/copilot-instructions.md +++ b/Nop.Plugin.Misc.AIPlugin/.github/copilot-instructions.md @@ -0,0 +1,53 @@ +# Nop.Plugin.Misc.AIPlugin — AI Agent Protocol + +This plugin follows the AI Agent Core Protocol defined in AyCode.Core. Same rules apply: `[LOADED_DOCS]` prefix (count+delta format), docs-before-code, no-re-read policy, context recovery on compaction, explicit consent for modifications. + +**Full protocol:** `../../../../../../Aycode/Source/AyCode.Core/.github/copilot-instructions.md` +**Protocol history:** `../../../../../../Aycode/Source/AyCode.Core/.github/LLM_PROTOCOL_DECISIONS.md` + +## Workspace Dependencies + +@repo { + name = "Nop.Plugin.Misc.AIPlugin" + type = "consumer" + layer = 3 + own-dep-repos = [ + "Mango.Nop.Core: ../../Libraries/Mango.Nop.Core", + "AyCode.Core: ../../../../../../Aycode/Source/AyCode.Core" + ] +} + +> nopCommerce plugin (Layer 3 consumer) built on Mango.Nop.Core (Layer 2 framework) and AyCode.Core (Layer 0). Contains FruitBank-specific AI/server-side logic for the nopCommerce plugin surface. +> External repos in `own-dep-repos` are fully accessible — read their source code, docs, and `.github/copilot-instructions.md` freely when you need type definitions, base classes, or context. + +## Shared Agent Skills + +Skills defined in other repos that can be referenced from here: + +- **docs-discovery** — Load relevant `.md` documentation (main + `_ISSUES` + `_TODO` paired sets) BEFORE source-code search or modifications. Saves tokens vs. grep-based rediscovery. + Location: `AyCode.Core/.github/skills/docs-discovery/SKILL.md` (see `own-dep-repos` above for the relative path to AyCode.Core) + **Invoke proactively** before any domain-related coding task (see "Documentation-first coding" below). Honours the active repo's **no-re-read** rule. + +- **protocol-audit** — Cross-repo consistency audit for `.github/copilot-instructions.md` across all repos. + Location: `AyCode.Core/.github/skills/protocol-audit/SKILL.md` + Activate from an AyCode.Core session, or read the SKILL.md directly and follow its steps. + +## Protocol History + +Cumulative log of LLM-protocol decisions (rule changes, new skills, structural shifts): + +- `AyCode.Core/.github/LLM_PROTOCOL_DECISIONS.md` + +Read this file when you need to understand **why** a rule is the way it is, or before proposing a protocol change — it may save a debate about something already resolved. + +## Documentation-first coding + +Before running any source-code `Grep` / `get_file` / `code_search` in response to a domain-related request, invoke the **`docs-discovery`** skill (path above). Scans `docs/` folders in THIS repo AND in referenced repos (via `own-dep-repos`) via Glob, loads paired .md sets as a unit. Rule-number-agnostic — refers to rule NAMES (no-re-read, folder-navigation, explicit-consent) which are stable across repos. + +## Related Documentation + +| Document | Topic | +|---|---| +| `docs/` | Plugin-specific documentation (if present) | +| `README.md` | Plugin overview | +| `plugin.json` | nopCommerce plugin manifest | diff --git a/Nop.Plugin.Misc.AIPlugin/Infrastructure/PluginNopStartup.cs b/Nop.Plugin.Misc.AIPlugin/Infrastructure/PluginNopStartup.cs index 7f767d1..045e1a6 100644 --- a/Nop.Plugin.Misc.AIPlugin/Infrastructure/PluginNopStartup.cs +++ b/Nop.Plugin.Misc.AIPlugin/Infrastructure/PluginNopStartup.cs @@ -170,9 +170,11 @@ public class PluginNopStartup : INopStartup // opts.FlushTimeout = TimeSpan.FromSeconds(10); // default — ~65 KB chunks transfer in ≤9s even on GPRS }); + #if DEBUG using var tmpSp = services.BuildServiceProvider(); foreach (var p in tmpSp.GetServices()) Console.WriteLine($">>> HubProtocol: Name={p.Name} v{p.Version} Assembly={p.GetType().Assembly.GetName().Name}"); + #endif } ///