Update AI Agent protocol docs and config/debug logic

- Switched to new `[LOADED_DOCS: N files (+K this turn: ...)]` prefix format in all protocol docs, with examples and enforcement details.
- Documented `docs-discovery` skill, protocol history, and documentation-first coding requirements.
- Added protocol documentation for `Nop.Plugin.Misc.AIPlugin`.
- Changed SQL connection string to use `FruitBank_DEV` in `appsettings.json`.
- Wrapped `IHubProtocol` debug output in `#if DEBUG` in `PluginNopStartup.cs`.
This commit is contained in:
Loretta 2026-04-24 08:20:19 +02:00
parent c5bed0b22a
commit 7faad25b23
2 changed files with 55 additions and 0 deletions

View File

@ -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 |

View File

@ -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<IHubProtocol>())
Console.WriteLine($">>> HubProtocol: Name={p.Name} v{p.Version} Assembly={p.GetType().Assembly.GetName().Name}");
#endif
}
/// <summary>