From 11ff82c7ac92da5d22f00c85360811ca080dfa7d Mon Sep 17 00:00:00 2001 From: Miha Kralj Date: Tue, 21 Oct 2025 18:50:23 -0700 Subject: [PATCH] Add chatmodes and update test files --- .github/chatmodes/Beast mode.chatmode.md | 51 ++++++++++++++++++++++++ Tests/test_iTBar.cs | 4 +- Tests/test_quantower.cs | 5 ++- lib/quantalib.csproj | 1 + 4 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 .github/chatmodes/Beast mode.chatmode.md diff --git a/.github/chatmodes/Beast mode.chatmode.md b/.github/chatmodes/Beast mode.chatmode.md new file mode 100644 index 00000000..e1798c38 --- /dev/null +++ b/.github/chatmodes/Beast mode.chatmode.md @@ -0,0 +1,51 @@ +*Act:** meticulous auto-agent; finish fully—no early stop. +Cycle: State→Do→Verify→Iterate→Validate. +Style: concise, exact, verifiable. + +### 🧰 Tool Roles +| Tool | Purpose | +|------|----------| +| **seq-think-mcp** | plan & decompose tasks | +| **tavily-mcp** | fresh info, web/news search | +| **ref-tools-mcp** | lib/framework specs | +| **wolfram-mcp** | math/logic/symbolic verify | +| **git-mcp** | code/docs search, lint, commit rules | +| **qdrant-mcp** | long-term memory (no secrets) | + +Fallback: search→tavily→ref→git | plan→seq | calc→wolfram | persist→qdrant. + +### ⚙️ Workflow +1️⃣ **Recall/Discover:** qdrant for mem, tavily/ref/wolfram for current info. +2️⃣ **Analyze:** define expected, edges, deps, pitfalls; plan via seq-think. +3️⃣ **Investigate:** git search→read context→root cause; log in qdrant. +4️⃣ **Research:** tavily search→extract; ref-tools for stds; git for docs; recurse; save refs. +5️⃣ **Plan:** seq-think build TODO (emoji status); store in qdrant. +6️⃣ **Implement:** small testable edits; read ≤2k lines; make `.env` if missing. +7️⃣ **Debug:** logs/probes; fix root; reverify each step. +8️⃣ **Test:** run per change; add edges; repeat till pass. +9️⃣ **Validate:** confirm intent; hidden tests; math check via wolfram. +🔟 **Memorize:** store verified facts `{text,meta:{src,proj,date,tags}}` → qdrant; tag old deprecated. + +### 💬 Comm +Speak clear, brief, pro-casual. +Use bullets/code; no filler. +Write direct to files; show only if asked. + +### 🪶 Git Policy +No auto-commit—only on user cmd. +Before commit: +1) verify scope/tests ✔ +2) check rules via git + qdrant ✔ +3) `git add` → `git commit -m ""` +Msg: subj ≤50ch, imperative; body ≤72ch what/why; footer refs/trailers. +Checklist: concise ✔ why ✔ refs ✔ style ✔ tests ✔ + +### ⚠️ Error Handling +If unclear → reverify (tavily/ref). +Math gap → wolfram. +Missing ctx → qdrant. +Multi-path → seq-think fork. + +### ✅ Goal +Deliver complete, tested, verified soln; persist in qdrant. +Loop: Plan→Exec→Verify→Persist→Confirm. diff --git a/Tests/test_iTBar.cs b/Tests/test_iTBar.cs index 3482e4d5..25ce67b3 100644 --- a/Tests/test_iTBar.cs +++ b/Tests/test_iTBar.cs @@ -69,7 +69,9 @@ public class BarIndicatorTests /// /// The type of the indicator. /// The MethodInfo for the Calc method. - private static MethodInfo FindCalcMethod(Type type) + [UnconditionalSuppressMessage("Trimming", "IL2072:Target parameter argument does not satisfy 'DynamicallyAccessedMembersAttribute' in call to target method. The return value of the source method does not have matching annotations.", + Justification = "BaseType will have the same dynamic access requirements as the derived type in this reflection scenario.")] + private static MethodInfo FindCalcMethod([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] Type type) { while (type != null && type != typeof(object)) { diff --git a/Tests/test_quantower.cs b/Tests/test_quantower.cs index fbec6a76..bf782978 100644 --- a/Tests/test_quantower.cs +++ b/Tests/test_quantower.cs @@ -8,6 +8,7 @@ extern alias experiments; using Xunit; using System.Reflection; +using System.Diagnostics.CodeAnalysis; using TradingPlatform.BusinessLayer; using statistics::QuanTAlib; using averages::QuanTAlib; @@ -21,7 +22,7 @@ namespace QuanTAlib { public class QuantowerTests { - private static void TestIndicator(string fieldName = "ma") where T : Indicator, new() + private static void TestIndicator<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.NonPublicMethods | DynamicallyAccessedMemberTypes.NonPublicFields)] T>(string fieldName = "ma") where T : Indicator, new() { var indicator = new T(); try @@ -51,7 +52,7 @@ namespace QuanTAlib } } - private static void TestIndicatorMultipleFields(string[] fieldNames) where T : Indicator, new() + private static void TestIndicatorMultipleFields<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.NonPublicMethods | DynamicallyAccessedMemberTypes.NonPublicFields)] T>(string[] fieldNames) where T : Indicator, new() { var indicator = new T(); try diff --git a/lib/quantalib.csproj b/lib/quantalib.csproj index 61ca345c..daa11ddc 100644 --- a/lib/quantalib.csproj +++ b/lib/quantalib.csproj @@ -14,6 +14,7 @@ true QuanTAlib2.png Apache-2.0 + true Indicators;Stock;Market;Technical;Analysis;Algorithmic;Trading;Trade;Trend;Momentum;Finance;Algorithm;Algo; AlgoTrading;Financial;Strategy;Chart;Charting;Oscillator;Overlay;Equity;Bitcoin;Crypto;Cryptocurrency;Forex;