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:
parent
6e3ca4a1e3
commit
25e5ded777
|
|
@ -3,9 +3,20 @@
|
|||
## 🛑 AI AGENT CORE PROTOCOL (CRITICAL ENFORCEMENT)
|
||||
You are operating in a multi-repo, documentation-first architecture. You MUST STRICTLY follow this protocol for every response. Failure to do so will break the workspace rules.
|
||||
|
||||
1. **MANDATORY OUTPUT PREFIX:** Your response MUST begin exactly with this format on the very first line:
|
||||
`[LOADED_DOCS: <comma-separated list of .md files currently in your context>]`
|
||||
*(If no .md files are loaded yet, write `[LOADED_DOCS: NONE]`.)*
|
||||
1. **MANDATORY OUTPUT PREFIX:** Your response MUST begin on the very first line with this format:
|
||||
`[LOADED_DOCS: N files (+K this turn: <comma-separated basenames>)]`
|
||||
- `N` = total count of `.md` files currently in your context (across all loaded docs in this conversation)
|
||||
- `K` = count of `.md` files newly loaded during THIS response (may be 0)
|
||||
- If `K > 0`: list the newly loaded **basenames only** (no paths) after `:`
|
||||
- If `K = 0`: write `[LOADED_DOCS: N files, no new loads]`
|
||||
- If `N = 0`: write `[LOADED_DOCS: NONE]`
|
||||
|
||||
**Examples:**
|
||||
- `[LOADED_DOCS: NONE]` — nothing loaded yet
|
||||
- `[LOADED_DOCS: 1 files, no new loads]` — only `copilot-instructions.md` loaded earlier, nothing new this turn
|
||||
- `[LOADED_DOCS: 4 files (+3 this turn: LOGGING.md, LOGGING_ISSUES.md, LOGGING_TODO.md)]` — 3 new this turn
|
||||
|
||||
This prefix is MANDATORY on **EVERY** response (not just the first, not just when loading happens). It serves two purposes: **(a)** user-visible compliance signal, and **(b)** self-commitment for the no-re-read rule — in subsequent turns you read your own prior prefix from the conversation to enforce Rule #3. Dropping the prefix breaks both.
|
||||
|
||||
2. **HARD-GATE DELAY (DOCS BEFORE CODE) & TOOL EXECUTION BLOCK:**
|
||||
- If `[LOADED_DOCS: NONE]` applies, you **MUST STOP** and you are **STRICTLY FORBIDDEN** to use the following tools: `code_search`, `get_symbols_by_name`, `find_symbol`, or `get_file` (for non-markdown files).
|
||||
|
|
@ -61,6 +72,22 @@ Skills defined in other repos that can be referenced from here:
|
|||
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.
|
||||
|
||||
- **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 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.
|
||||
|
||||
## nopCommerce Compatibility
|
||||
1. All three libraries target **net9.0** — required by nopCommerce 4.80.9. Do NOT change TFM.
|
||||
2. **NopDependencies** folder in `Mango.Nop.Core` contains **mirror copies** of nopCommerce entity classes (`BaseEntity`, `Customer`, `Order`, `Product`, `GenericAttribute`, etc.) so that `Mango.Nop.Core` can be referenced without the full nopCommerce dependency chain.
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
name = "Mango.Nop.Core"
|
||||
type = "framework"
|
||||
layer = 2
|
||||
own-dep-repos = ["AyCode.Core: ../../../../../../../Aycode/Source/AyCode.Core"]
|
||||
own-dep-repos = ["AyCode.Core: ../../../../../../Aycode/Source/AyCode.Core"]
|
||||
}
|
||||
|
||||
> Domain framework for NopCommerce plugins. Built on Layer 0 (AyCode.Core), consumed by Layer 3 (specific plugin apps, plural and unknown).
|
||||
|
|
@ -39,6 +39,30 @@ Framework design = **"write the base first, derive the specific later"**.
|
|||
|
||||
Full doctrine: AyCode.Core's `.github/copilot-instructions.md#framework-first-design-principle` and `docs/ARCHITECTURE.md#framework-vs-consumer-boundary`.
|
||||
|
||||
## 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 |
|
||||
|
|
|
|||
Loading…
Reference in New Issue