From 045b8e152638c3c263bb1f25b2ac22ecb79ffb38 Mon Sep 17 00:00:00 2001 From: Loretta Date: Tue, 31 Mar 2026 16:15:01 +0200 Subject: [PATCH] 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, "do not re-read .md files" rule, and explicit permission to navigate external repos Co-Authored-By: Claude Opus 4.6 --- .github/copilot-instructions.md | 6 +++++- CLAUDE.md | 11 +---------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 3120a55..09aefa7 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1,14 +1,17 @@ # AyCode.Blazor — Domain Rules +# own-dep-repos: "name: path" — paths are relative to this repo root (.github/..) @repo { + name = "AyCode.Blazor" type = "framework" layer = 1 - own-dep-repos = ["AyCode.Core"] + own-dep-repos = ["AyCode.Core: ../AyCode.Core"] } > This is the **single source of truth** for Blazor/MAUI UI domain rules. Do not duplicate these elsewhere. > For core framework rules see: `../AyCode.Core/.github/copilot-instructions.md` > For detailed docs see: `README.md` → `docs/` +> 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. ## DevExpress Components 1. **DevExpress Blazor 25.1.3** — always use `DxGrid`, `DxFormLayout`, etc. Do NOT mix with generic Blazor component libraries. @@ -31,6 +34,7 @@ 12. **No redundant code** — before writing new logic, check whether similar methods already exist in the current context. Reuse or extract shared logic into smaller methods rather than duplicating. 13. **Keep all .md files in sync** — when you modify code and you know which .md file documents it, update that .md file too. If you notice a contradiction between code and an .md file, automatically update the .md to match the code (code is the source of truth). When fixing a reference, check other .md files that may share the same broken reference. If the root cause is at a lower layer, fix it there first. During code review, if you find useful behavior or conventions not yet documented, briefly suggest what to document and where — but do not add new content without approval. 14. **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. +15. **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. ## Related Solutions 15. **AyCode.Core** solution (`../AyCode.Core/AyCode.Core.sln`) contains all core framework code (SignalR, serialization, data sources, base classes, interfaces). Types referenced in this Blazor solution but not defined here (e.g. `AcSignalRDataSource`, `AcBinaryHubProtocol`, `IId`, `AcObservableCollection`, `AcLoggerBase`) likely live in AyCode.Core. diff --git a/CLAUDE.md b/CLAUDE.md index 738a7b0..6667677 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,10 +1 @@ -# AyCode.Blazor — Claude Code Instructions - -Before writing any code, read these files: -1. `.github/copilot-instructions.md` — Domain rules and UI pitfalls (single source of truth) -2. `docs/GLOSSARY.md` — Blazor/MAUI terminology and DevExpress conventions -3. The relevant project's `README.md` for folder-specific context - -This solution depends on **AyCode.Core** (`../AyCode.Core/AyCode.Core.sln`). When a type is referenced but not defined in this Blazor solution (e.g. `AcSignalRDataSource`, `AcBinaryHubProtocol`, `IId`, `AcObservableCollection`, `AcLoggerBase`), look it up in AyCode.Core source. For core framework rules see `../AyCode.Core/CLAUDE.md`. - -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.