From ba25e39b4fcb4ff5352c8c25a5b4f76c378f7422 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Wed, 29 Jul 2026 19:18:23 +0200 Subject: [PATCH] docs: streamline copilot instructions (#2053) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- .github/copilot-instructions.md | 61 +-------------------------------- 1 file changed, 1 insertion(+), 60 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 07cb9620..f027546a 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -117,70 +117,11 @@ Documentation serves as an operational specification, not narrative prose. ## Quality gates -Each sub-project has its own quality gates (format, typecheck, lint, build, test). See sub-project READMEs for exact commands. Run gates for every sub-project affected by your changes. +Each sub-project has its own quality gates (format, lint, typecheck, build, test). See sub-project READMEs for exact commands. Run gates for every sub-project affected by your changes. - Logs use appropriate levels (error, warn, info, debug). - Pull request title and commit messages follow [Conventional Commits](https://www.conventionalcommits.org/) format. -## Examples - -### Naming coherence - -**Good** (consistent style, clear semantics): - -```typescript -const thresholdValue = 0.06 -const processingMode = 'piecewise' -type ChargingStationStatus = 'Available' | 'Preparing' | 'Charging' -``` - -**Bad** (mixed styles, ambiguous): - -```typescript -const threshold_value = 0.06 // inconsistent case style -const thresholdAim = 0.06 // synonym creates ambiguity -type charging_station_status // wrong casing for type -``` - -### Promise-based request/response pattern - -**Good** (proper async flow): - -```typescript -protected handleProtocolRequest( - uuid: string, - procedureName: ProcedureName, - payload: RequestPayload -): Promise { - return new Promise((resolve, reject) => { - this.pendingRequests.set(uuid, { reject, resolve }) - this.sendBroadcastChannelRequest(uuid, procedureName, payload) - }) -} -``` - -**Bad** (returns void, no Promise): - -```typescript -protected handleProtocolRequest( - uuid: string, - procedureName: ProcedureName, - payload: RequestPayload -): void { - this.sendBroadcastChannelRequest(uuid, procedureName, payload) - // Response never reaches caller! -} -``` - -### Statistical reporting - -```markdown -| Metric | Value | Interpretation | -| ----------- | ----- | --------------------- | -| KL(A‖B) | 0.023 | < 0.1: low divergence | -| Effect size | 0.12 | small to medium | -``` - --- By following these instructions, coding agents should propose changes that are consistent and maintainable across languages. -- 2.53.0