From 9e3a56e3c40ae1a933133b2dda658ec528ed214b Mon Sep 17 00:00:00 2001 From: Valisthea Date: Wed, 8 Apr 2026 11:19:33 -0400 Subject: [PATCH] =?UTF-8?q?feat:=20add=20kairos-floor-score=20skill=20?= =?UTF-8?q?=E2=80=94=20ML=20trade=20scoring=20for=20AI=20agents?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Institutional-grade GBDT scoring, regime detection, microstructure analysis, and confluence scoring for the OKX Build X Hackathon. --- skills/kairos-floor-score/LICENSE | 21 +++++ skills/kairos-floor-score/SKILL.md | 109 ++++++++++++++++++++++++++ skills/kairos-floor-score/plugin.yaml | 23 ++++++ 3 files changed, 153 insertions(+) create mode 100644 skills/kairos-floor-score/LICENSE create mode 100644 skills/kairos-floor-score/SKILL.md create mode 100644 skills/kairos-floor-score/plugin.yaml diff --git a/skills/kairos-floor-score/LICENSE b/skills/kairos-floor-score/LICENSE new file mode 100644 index 00000000..4100a5f7 --- /dev/null +++ b/skills/kairos-floor-score/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Valisthea (Kairos Lab) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/skills/kairos-floor-score/SKILL.md b/skills/kairos-floor-score/SKILL.md new file mode 100644 index 00000000..b7c42cec --- /dev/null +++ b/skills/kairos-floor-score/SKILL.md @@ -0,0 +1,109 @@ +--- +name: kairos-floor-score +version: 1.0.0 +description: "Institutional-grade ML trade scoring for AI agents. Regime classification, microstructure analysis, confluence scoring, GO/REDUCE/REJECT recommendation. Trigger on: trade scoring, market analysis, regime detection, risk assessment, entry quality, VPIN, order flow." +author: Valisthea +--- + +# Kairos Floor Score + +## When to Use + +Invoke this skill whenever you need to determine the quality of a trade entry. Common triggers: + +- "Should I go long/short on X?" +- "Score this trade setup" +- "What's the market regime right now?" +- "Is there enough liquidity to enter?" +- "Check confluence for this entry" +- "What's the VPIN / order flow saying?" +- "Evaluate this trade for risk" + +## How to Call + +### Full Trade Scoring + +```bash +kairos-floor-score analyze \ + --symbol BTC-USDT \ + --side long \ + --klines '' \ + --funding-rate 0.0001 \ + --output json +``` + +The output JSON contains: +- `recommendation`: `GO` (score >= 0.55), `REDUCE` (>= 0.45), or `REJECT` (< 0.45) +- `score`: ML probability [0, 1] +- `confidence`: HIGH / MEDIUM / LOW +- `regime`: market regime classification with tradability assessment +- `confluence`: 5-group weighted confluence breakdown +- `microstructure`: Kyle Lambda, VPIN, order imbalance, spread + +### Regime Detection Only + +```bash +kairos-floor-score regime --klines '' +``` + +### Microstructure Only + +```bash +kairos-floor-score microstructure --klines '' +``` + +### Health Check + +```bash +kairos-floor-score health +``` + +## Interpreting Results + +### Recommendation + +| Value | Score Range | Action | +|---------|-------------|--------| +| GO | >= 0.55 | Execute the trade with normal sizing | +| REDUCE | 0.45 - 0.55 | Trade with reduced size or wait for better setup | +| REJECT | < 0.45 | Do not enter this trade | + +### Regime + +The regime classifier identifies 5 states: `trending_up`, `trending_down`, `ranging`, `volatile`, `dead`. Only trade when `tradable: true`. + +### Confluence + +5 factor groups are scored independently: +- **Trend** (25%): EMA cross, SMA position, multi-timeframe alignment +- **Momentum** (20%): RSI, ADX, MACD histogram +- **Volatility** (20%): ATR percentage, Bollinger bandwidth +- **Flow** (20%): Volume ratio, order imbalance +- **Sentiment** (15%): Funding rate, premium/discount + +### Microstructure + +- **VPIN > 0.7**: High probability of informed trading — caution +- **Kyle Lambda high**: Thin liquidity, expect slippage +- **Order Imbalance > 0.3**: Strong directional pressure + +## Integration with OKX Onchain OS + +If `onchainos` CLI is installed, data can be fetched directly: + +```bash +kairos-floor-score analyze \ + --symbol BTC-USDT \ + --side long \ + --source onchainos \ + --chain solana +``` + +## Agent Workflow + +1. Receive trade signal from upstream strategy +2. Call `kairos-floor-score analyze` with current market data +3. If recommendation is `GO`, proceed to position sizing +4. If `REDUCE`, cut position size by 50% +5. If `REJECT`, skip this trade entirely +6. Log the full score result for post-trade analysis diff --git a/skills/kairos-floor-score/plugin.yaml b/skills/kairos-floor-score/plugin.yaml new file mode 100644 index 00000000..e835c2c9 --- /dev/null +++ b/skills/kairos-floor-score/plugin.yaml @@ -0,0 +1,23 @@ +schema_version: 1 +name: kairos-floor-score +version: "1.0.0" +description: "Institutional-grade ML trade scoring for AI trading agents. GBDT model + regime detection + microstructure analysis + confluence scoring. GO/REDUCE/REJECT recommendations." +author: + name: "Valisthea" + github: "Valisthea" +license: MIT +category: trading-strategy +type: community-developer +tags: + - trading + - ml + - scoring + - onchainos + - xlayer + +components: + skill: + repo: "Valisthea/kairos-floor-score" + commit: "2cf14a97042542a5cdeeb3e8f5a9aac4de5834ff" + +api_calls: []