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
22+ - ** Commits** : Subject ≤80 chars, include issue number (#123 ), body lines ≤80 chars, conventional commits
2223
23- ## 🏗️ Architecture at a Glance
24+ ## Architecture
2425
2526``` text
2627Controller → Service → Repository → Database
2728 ↓ ↓
2829Validation Caching
2930```
3031
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)
32+ Controllers: Minimal logic, delegate to services
33+ Services: Business logic + ` IMemoryCache ` caching
34+ Repositories: Generic ` Repository<T> ` + specific implementations
35+ Models: ` Player ` entity + DTOs
36+ Validators: FluentValidation ( structure only, business rules in services)
3637
37- ## ✅ Copilot Should
38+ ## Copilot Should
3839
3940- Generate idiomatic ASP.NET Core code with minimal controller logic
4041- Use EF Core async APIs with ` AsNoTracking() ` for reads
@@ -44,14 +45,14 @@ Validation Caching
4445- Use primary constructors for DI
4546- Implement structured logging with ` ILogger<T> `
4647
47- ## 🚫 Copilot Should Avoid
48+ ## Copilot Should Avoid
4849
4950- Synchronous EF Core APIs
5051- Controller business logic (belongs in services)
5152- Static service/repository classes
5253- ` ConfigureAwait(false) ` (unnecessary in ASP.NET Core)
5354
54- ## ⚡ Quick Commands
55+ ## Quick Commands
5556
5657``` bash
5758# Run with hot reload
@@ -66,12 +67,21 @@ docker compose up
6667# Swagger: https://localhost:9000/swagger
6768```
6869
69- ## 📚 Need More Detail?
70+ ## Load On-Demand Files
7071
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 `
72+ ** Load ` #file:AGENTS.md ` when:**
73+ - "How do I run tests with coverage?"
74+ - "CI/CD pipeline setup or troubleshooting"
75+ - "Database migration procedures"
76+ - "Publishing/deployment workflows"
77+ - "Detailed troubleshooting guides"
78+
79+ ** Load ` #file:SKILLS/<skill-name>/SKILL.md ` (planned):**
80+ - Docker optimization: ` docker-containerization/SKILL.md `
81+ - Testing patterns: ` testing-patterns/SKILL.md `
82+
83+ ** Human-readable overview** : See ` README.md ` (not auto-loaded)
7484
7585---
7686
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!
87+ ** 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