]> Piment Noir Git Repositories - freqai-strategies.git/commitdiff
chore: refine github copilot instructions
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Sat, 4 Oct 2025 08:57:59 +0000 (10:57 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Sat, 4 Oct 2025 08:57:59 +0000 (10:57 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
.github/copilot-instructions.md

index 72a562384934d37d6d70dd5e7be02beb5142ae20..1494adc551d1b0cd5c60bebc049d12cfd8439e67 100644 (file)
@@ -9,8 +9,11 @@ These instructions guide GitHub Copilot to generate changes consistent with this
 
 ## Core principles
 
+- **Design patterns**: prefer established patterns (e.g., factory, singleton, strategy) for code organization and extensibility.
+- **Algorithmic**: prefer algorithms or heuristics minimizing time and space complexity.
+- **DRY**: avoid duplication of logic, data, and naming. Factor out commonalities.
 - **Single source of truth**: maintain a canonical defaults map for configuration tunables. Derive all user-facing options automatically.
-- **Naming coherence**: prefer semantically accurate names across code, documentation, and outputs. Avoid synonyms that create ambiguity.
+- **Naming coherence**: prefer semantically accurate names across code, documentation, directories, and outputs. Avoid synonyms that create ambiguity.
 - **English-only**: code, tests, logs, comments, and documentation must be in English.
 - **Small, verifiable changes**: prefer minimal diffs that keep public behavior stable unless explicitly requested.
 - **Tests-first mindset**: add or update minimal tests before refactoring or feature changes.
@@ -25,7 +28,7 @@ These instructions guide GitHub Copilot to generate changes consistent with this
 ## Statistical conventions
 
 - **Hypothesis testing**: use a single test statistic (e.g., t-test) when possible.
-- **Divergence metrics**: document direction explicitly (e.g., KL(A||B) vs KL(B||A)); normalize distributions; add epsilon to avoid numerical issues.
+- **Divergence metrics**: document direction explicitly (e.g., KL(A||B) vs KL(B||A)); normalize distributions; add numerical stability measures.
 - **Distance vs divergence**: distinguish clearly; use consistent terminology.
 - **Effect sizes**: report alongside test statistics and p-values; use standard formulas; document directional interpretation.
 - **Distribution comparisons**: use multiple complementary metrics (parametric and non-parametric).
@@ -51,7 +54,8 @@ These instructions guide GitHub Copilot to generate changes consistent with this
 ## Implementation guidance for Copilot
 
 - **Before coding**:
-  - Locate and analyze relevant existing code.
+  - Locate and analyze thoroughly relevant existing code.
+  - Identify code architecture and design patterns.
   - Identify canonical defaults and naming patterns.
 - **When adding a tunable**:
   - Add to defaults with safe value.