11# GitHub Copilot Instructions
22
3- > ** ⚡ Token Efficiency Note ** : This is a minimal pointer file ( ~ 500 tokens, auto-loaded by Copilot).
4- > For complete operational details, reference : ` #file:AGENTS.md ` (~ 2,500 tokens, loaded on-demand)
5- > For specialized knowledge, use : ` #file:SKILLS/<skill- name>/SKILL.md ` (loaded on-demand when needed )
3+ > ** Token Budget ** : Target 600, limit 650 ( auto-loaded)
4+ > Details : ` #file:AGENTS.md ` (~ 2,550 tokens, on-demand)
5+ > Skills : ` #file:SKILLS/<name>/SKILL.md ` (on-demand)
66
7- ## 🎯 Quick Context
7+ ## Quick Context
88
9- ** Project ** : ASP.NET Core 8 REST API demonstrating layered architecture patterns
10- ** Stack** : .NET 8 ( LTS) • EF Core 9 • SQLite • Docker • xUnit
11- ** Pattern** : Repository + Service Layer + AutoMapper + FluentValidation
12- ** Philosophy ** : Learning-focused PoC emphasizing clarity and best practices
9+ ASP.NET Core 8 REST API with layered architecture
10+ ** Stack** : .NET 8 LTS, EF Core 9, SQLite, Docker, xUnit
11+ ** Pattern** : Repository + Service + AutoMapper + FluentValidation
12+ ** Focus ** : Learning PoC emphasizing clarity and best practices
1313
14- ## 📐 Core Conventions
14+ ## Core Conventions
1515
1616- ** Naming** : PascalCase (public), camelCase (private)
1717- ** DI** : Primary constructors everywhere
1818- ** Async** : All I/O operations use async/await
1919- ** Logging** : Serilog with structured logging
2020- ** Testing** : xUnit + Moq + FluentAssertions
21- - ** Formatting** : CSharpier (opinionated)
21+ - ** Formatting** : CSharpier
2222
23- ## 🏗️ Architecture at a Glance
23+ ## Architecture
2424
2525``` text
2626Controller → Service → Repository → Database
2727 ↓ ↓
2828Validation Caching
2929```
3030
31- - ** Controllers** : Minimal logic, delegate to services
32- - ** Services** : Business logic + caching with ` IMemoryCache `
33- - ** Repositories** : Generic ` Repository<T> ` + specific implementations
34- - ** Models** : ` Player ` entity + Request/Response DTOs
35- - ** Validators** : FluentValidation for input structure ( business rules in services)
31+ Controllers: Minimal logic, delegate to services
32+ Services: Business logic + ` IMemoryCache ` caching
33+ Repositories: Generic ` Repository<T> ` + specific implementations
34+ Models: ` Player ` entity + DTOs
35+ Validators: FluentValidation ( structure only, business rules in services)
3636
37- ## ✅ Copilot Should
37+ ## Copilot Should
3838
3939- Generate idiomatic ASP.NET Core code with minimal controller logic
4040- Use EF Core async APIs with ` AsNoTracking() ` for reads
@@ -44,14 +44,14 @@ Validation Caching
4444- Use primary constructors for DI
4545- Implement structured logging with ` ILogger<T> `
4646
47- ## 🚫 Copilot Should Avoid
47+ ## Copilot Should Avoid
4848
4949- Synchronous EF Core APIs
5050- Controller business logic (belongs in services)
5151- Static service/repository classes
5252- ` ConfigureAwait(false) ` (unnecessary in ASP.NET Core)
5353
54- ## ⚡ Quick Commands
54+ ## Quick Commands
5555
5656``` bash
5757# Run with hot reload
@@ -66,12 +66,21 @@ docker compose up
6666# Swagger: https://localhost:9000/swagger
6767```
6868
69- ## 📚 Need More Detail?
69+ ## Load On-Demand Files
7070
71- ** For operational procedures** : Load ` #file:AGENTS.md `
72- ** For Docker expertise** : * (Planned)* ` #file:SKILLS/docker-containerization/SKILL.md `
73- ** For testing patterns** : * (Planned)* ` #file:SKILLS/testing-patterns/SKILL.md `
71+ ** Load ` #file:AGENTS.md ` when:**
72+ - "How do I run tests with coverage?"
73+ - "CI/CD pipeline setup or troubleshooting"
74+ - "Database migration procedures"
75+ - "Publishing/deployment workflows"
76+ - "Detailed troubleshooting guides"
77+
78+ ** Load ` #file:SKILLS/<skill-name>/SKILL.md ` (planned):**
79+ - Docker optimization: ` docker-containerization/SKILL.md `
80+ - Testing patterns: ` testing-patterns/SKILL.md `
81+
82+ ** Human-readable overview** : See ` README.md ` (not auto-loaded)
7483
7584---
7685
77- 💡 ** Why this structure?** Copilot auto-loads this file on every chat ( ~ 500 tokens). Loading ` AGENTS.md ` or ` SKILLS/ ` explicitly gives you deep context only when needed, saving 80% of your token budget!
86+ ** Why this structure?** Base instructions ( ~ 600 tokens) load automatically. On-demand files ( ~ 2,550 tokens) load only when needed, saving 80% of tokens per chat.
0 commit comments