Update LLM instruction files for token efficiency and cross-repo navigation

- CLAUDE.md: reduced to single-line pointer to copilot-instructions.md (eliminates redundant auto-loaded content)
- copilot-instructions.md: added @repo name field, relative paths in own-dep-repos, SCHEMA.md first-use read, "do not re-read .md files" rule, and explicit permission to navigate external repos

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Loretta 2026-03-31 16:15:04 +02:00
parent 5e4bb4c8e0
commit 3f49945bfb
2 changed files with 12 additions and 33 deletions

View File

@ -1,9 +1,15 @@
# FruitBankHybridApp — Domain Rules
# own-dep-repos: "name: path" — paths are relative to this repo root (.github/..)
@repo {
name = "FruitBankHybridApp"
type = "product"
layer = 2
own-dep-repos = ["AyCode.Core", "AyCode.Blazor", "Mango.Nop Libraries"]
own-dep-repos = [
"AyCode.Core: ../../../Aycode/Source/AyCode.Core",
"AyCode.Blazor: ../../../Aycode/Source/AyCode.Blazor",
"Mango.Nop Libraries: ../NopCommerce.Common/4.70/Libraries"
]
}
> This is the **single source of truth** for domain rules. Do not duplicate these elsewhere.
@ -11,6 +17,9 @@
> For core framework rules see: `.github/copilot-instructions.md` (in AyCode.Core repo)
> For UI framework rules see: `.github/copilot-instructions.md` (in AyCode.Blazor repo)
> For nopCommerce library rules see: `.github/copilot-instructions.md` (in Mango.Nop Libraries repo)
> For nopCommerce plugin (server side) rules see: `../NopCommerce.Common/4.70/Plugins/Nop.Plugin.Misc.AIPlugin/README.md` (in Mango.Nop Plugins repo)
> On first use, read `../NopCommerce.Common/4.70/Plugins/Nop.Plugin.Misc.AIPlugin/docs/SCHEMA.md` — full TOON domain model (rule 21 prevents re-reading)
> 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. Do not limit yourself to the current workspace.
## Business Domain
1. **FruitBank** = fruit & vegetable wholesaler. The server side runs as a **nopCommerce plugin** — Customer, Order, Product, GenericAttribute are nopCommerce entities.
@ -42,3 +51,4 @@
18. **Mango.Nop Libraries** (`../NopCommerce.Common/4.70/Libraries/`) — independent shared library with its own `.github/copilot-instructions.md` and `docs/`. Contains DTOs, entities, data access, and service base classes. DTO or entity base classes not found in this solution likely live in Libraries.
19. **FruitBank nopCommerce Plugin** (`../NopCommerce.Common/4.70/Plugins/Nop.Plugin.Misc.AIPlugin/`) is the server-side plugin running inside nopCommerce 4.80.9. Contains SignalR hubs/endpoints, measurement services, data access (DbTable classes), admin controllers, and AI services. Server-side endpoints and services are defined here.
20. **Documentation layering** — write `.md` documentation at the **defining layer** (where the code lives). Higher-layer `.md` files reference the base docs (e.g. `see AyCode.Core/docs/SIGNALR.md`) and document only project-specific overrides or extensions. Never duplicate base-layer descriptions in consumer-level docs.
21. **Do not re-read .md files** already in your context window. They only change if you modify them yourself (new content is already in context) or if the developer tells you they changed — in that case re-read them once.

View File

@ -1,32 +1 @@
# FruitBankHybridApp — Claude Code Instructions
Before writing any code, read these files:
1. `.github/copilot-instructions.md` — Domain rules and critical pitfalls (single source of truth)
2. `docs/GLOSSARY.md` — Domain terms, measurement logic, and common traps
3. `docs/SCHEMA.md` — Full domain model in Toon format
4. The relevant project's `README.md` for folder-specific context
## External Repos
This solution depends on external code in sibling directories. Their **full source code** is available — browse them freely for type definitions, base classes, patterns, and docs:
| Repo | Path (relative to this repo root) | Contains |
|---|---|---|
| **AyCode.Core** | `../../../Aycode/Source/AyCode.Core/` | SignalR base classes, serialization, binary protocol, data sources, logging |
| **AyCode.Blazor** | `../../../Aycode/Source/AyCode.Blazor/` | MgGridBase, MgGridWithInfoPanel, toolbar, layout persistence, Blazor components |
| **Mango.Nop Libraries** | `../NopCommerce.Common/4.70/Libraries/` | Independent shared library with own `.github/copilot-instructions.md` and `docs/`. DTOs, entities, data access, service base classes |
| **FruitBank Plugin** | `../NopCommerce.Common/4.70/Plugins/Nop.Plugin.Misc.AIPlugin/` | nopCommerce 4.80.9 server-side plugin: SignalR hubs, measurement services, DbTable classes, admin controllers, AI services |
Key docs in those repos:
- `../../../Aycode/Source/AyCode.Core/.github/copilot-instructions.md` — core framework rules
- `../../../Aycode/Source/AyCode.Core/docs/ARCHITECTURE.md` — core architecture
- `../../../Aycode/Source/AyCode.Blazor/.github/copilot-instructions.md` — UI framework rules
- `../../../Aycode/Source/AyCode.Blazor/docs/MGGRID.md` — MgGrid technical reference
- `../../../Aycode/Source/AyCode.Blazor/docs/ARCHITECTURE.md` — UI architecture
- `../NopCommerce.Common/4.70/Libraries/.github/copilot-instructions.md` — Mango.Nop library rules
- `../NopCommerce.Common/4.70/Libraries/docs/ARCHITECTURE.md` — library architecture + NopDependencies pattern
- `../NopCommerce.Common/4.70/Plugins/Nop.Plugin.Misc.AIPlugin/README.md` — FruitBank plugin overview
When a type is referenced but not defined in this solution, look it up in AyCode.Core, AyCode.Blazor, or the Mango.Nop Libraries. When a server-side endpoint or service is referenced, look it up in the FruitBank Plugin.
When modifying code, update the corresponding README.md if it becomes out of sync with the code.
Always read `.github/copilot-instructions.md` first — it is the single source of truth for this repo.