From 6a22b108ff520800a66cf6ddf8f70be693d3ff35 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Wed, 29 Jul 2026 12:38:25 +0200 Subject: [PATCH] docs: streamline coding agent instructions --- .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 1b24f89f8..702a56207 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -91,71 +91,12 @@ Documentation serves as an operational specification, not narrative prose. ## Quality gates -- Documented build/lint/type checks pass (where applicable). +- Documented build/format/lint/type checks pass (where applicable). - Documented tests pass (where applicable). - Documentation updated to reflect changes when necessary. - 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