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
6743d5f14f
commit
e3f04cd396
|
|
@ -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).
|
||||
|
|
@ -67,6 +78,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.
|
||||
|
||||
## Business Domain
|
||||
1. **FruitBank** = fruit & vegetable wholesaler. The server side runs as a **nopCommerce plugin** — Customer, Order, Product, GenericAttribute are nopCommerce entities.
|
||||
2. **Shipping** = INBOUND delivery (supplier → warehouse). **Order** = OUTBOUND delivery (warehouse → customer). Never confuse the two directions.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"ConnectionStrings": {
|
||||
"ConnectionString": "Data Source=195.26.231.218;Initial Catalog=FruitBank_PROD;Integrated Security=False;Persist Security Info=False;User ID=sa;Password=v6f_?xNfg9N1;Trust Server Certificate=True",
|
||||
"ConnectionString": "Data Source=195.26.231.218;Initial Catalog=FruitBank_DEV;Integrated Security=False;Persist Security Info=False;User ID=sa;Password=v6f_?xNfg9N1;Trust Server Certificate=True",
|
||||
"DataProvider": "sqlserver",
|
||||
"SQLCommandTimeout": null,
|
||||
"WithNoLock": false
|
||||
|
|
|
|||
Loading…
Reference in New Issue