kestrel-strategy
KESTREL v3.0.0 โ XYZ Macro Breakout Rider (senpi_runtime_helpers migration). Plumbing-only port from v2.0. NO thesis change. NO scoring change. NO threshold change. Producer ports onto `senpi_runtime_helpers` (in-process SenpiClient + direct HTTP POST to runtime /signals + producer_daemon long-lived loop). Detects >=1.5% hourly price breakouts on commodities, indices, and high-volume equities 24/7 on Hyperliquid XYZ DEX. LLM regime gate + FEE_OPTIMIZED_LIMIT entries/exits + held-asset dedup + post-close cooldown + chain DB telemetry. Conservative 3-5x leverage.
What this skill does
# ๐ฆ KESTREL v2.0 โ XYZ Macro Breakout Rider The first Senpi agent to trade Hyperliquid XYZ DEX (commodities/metals/indices/equities) on a v2 producer architecture. ## What v2.0 fixes from v1.x v1.1 was a v1 full-agency Python scanner that: - Called `create_position` directly (no LLM gate, no chain telemetry) - Used `ensureExecutionAsTaker: false` on entries (resting-on-book bug) - Had over-strict scoring math: MOVE_EXHAUSTION penalty cancelled out 4H alignment, leaving most breakouts below MIN_SCORE 6 v2.0 fixes all three: ### Architecture: v2 producer + LLM gate + DSL - `kestrel-producer.py` emits scored breakout signals via `SenpiClient.push_signal()` (direct HTTP POST). NO execution code. - Runtime LLM gate is regime-aware โ applies macro vetoes (BTC drawdown propagating to risk-off equities, vol expansion spikes) the producer can't see. - `risk.guard_rails` declarative โ runtime owns daily caps, drawdown halt, cooldowns. - Trade chain DB emits LIFECYCLE / DECISION_EXECUTED / ACTION_RESULT / DSL_CREATED / DSL_CLOSED โ first time Kestrel has telemetry. ### Execution: maker-first, taker-fallback - Both entries AND exits use `FEE_OPTIMIZED_LIMIT` with `ensure_execution_as_taker: true`. - After 60s ALO timeout, falls back to taker โ no more "resting on book" with phantom realized PnL. - Saves ~0.020-0.030% per maker-filled close vs v1.x MARKET orders. ### Calibration: scoring relaxed to actually trade v1.1 only fired 2 trades / $60 volume in its lifetime. v2.0 calibration: - **1H base scores +1**: 1.5% triggers +3 (was +2), 2% triggers +4 (was +3), 3% triggers +5 (was +4). The 1H breakout is the PRIMARY signal โ weight it heavier. - **MOVE_EXHAUSTION threshold 4%โ6%**, MOVE_TIRING 2.5%โ4%. v1.1's penalty kicked in too early, cancelling 4H alignment bonus and yielding net 0-1 contribution. - **MIN_SCORE 6โ5** modest relaxation. - **Spread gate 0.2%โ0.35%** โ XYZ tickers have wider natural spreads than crypto. Expected impact: 2-3 trades/month โ 5-15 trades/month. ## Thesis (preserved from v1.1.1) When a macro asset moves >=1.5% in an hour with volume confirmation, the move usually continues for 1-3 hours. Ride the trend with wide DSL. 12-asset universe: - **Commodities**: CL (oil), BRENTOIL - **Precious metals**: GOLD (SILVER removed v1.1.1 โ HL doesn't support) - **Indices**: SP500, XYZ100 - **High-volume equities**: AAPL, NVDA, GOOGL, TSLA, AMZN, META, MSFT 24/7 trading. No market-hours gate โ Hyperliquid XYZ trades all hours including weekends and overnight (Iran/oil scenarios are the whole point). ## Scoring components (v2.0) | Component | Range | Source | |---|---|---| | 1H breakout magnitude | +3 to +5 | hard gate >=1.5% | | 4H trend alignment | 0 to +2 | matches breakout direction | | MOVE_EXHAUSTION penalty | 0 to -2 | when 4H >=6% (was >=4% in v1.1) | | MOVE_TIRING penalty | 0 to -1 | when 4H >=4% (was >=2.5%) | | Volume surge | 0 to +2 | vs 4-bar 1H average | | SM confirmation | 0 to +2 | XYZ-filtered SM leaderboard | | Funding alignment | 0 to +1 | favorable for breakout direction | Score-tiered leverage: | Score | Leverage | |---|---| | 9+ | 5x | | 5-8 | 3x | ## DSL preset (v2.0) | Phase | Component | Setting | |---|---|---| | Phase 1 | max_loss_pct | 18% | | Phase 1 | retrace_threshold | 8 | | Phase 1 | consecutive_breaches | 3 | | Phase 2 T0 | trigger 5% / lock 35% | fleet-standard | | Phase 2 T1 | trigger 10% / lock 50% | | | Phase 2 T2 | trigger 20% / lock 65% | | | Phase 2 T3 | trigger 35% / lock 80% | | | Phase 2 T4 | trigger 50% / lock 90% | apex | | hard_timeout | 480 min (8h) | enabled | | weak_peak_cut | 60 min, min 2.0 | enabled | | dead_weight_cut | 45 min | enabled (catches false breakouts) | ## Risk gates (`runtime.yaml` `risk.guard_rails`) | Gate | Setting | |---|---| | daily_loss_limit_pct | 10% | | max_entries_per_day | 12 (producer dynamic-cap below) | | max_consecutive_losses | 3 | | cooldown_minutes (post-loss) | 30 | | drawdown_halt_pct | 25% | | drawdown_reset_on_day_rollover | false | | per_asset_cooldown_minutes | 180 (3h) | Producer-side dynamic daily cap (P&L-aware): - +5% PnL โ 12 trades/day - โฅ0% โ 8 - -5% โ 5 - -15% โ 3 - -25% โ 1 - <-25% โ 0 (HARD STOP) ## Fleet patches incorporated - โ **Held-asset dedup** (3-layer: producer pre-filter, LLM gate, runtime per_asset_cooldown) - โ **Post-close cooldown** (180min; producer-side runtime-cooldown backstop) - โ **Reentrancy guard** (producer_daemon scanner_lock with stale-PID auto-recovery) - โ **Wallet-from-config** (no hardcoding) - โ **drawdown_reset_on_day_rollover: false** - โ **FEE_OPTIMIZED_LIMIT** entries AND exits with `ensure_execution_as_taker: true` - โ **Fleet-standard T0/T1 ladder** - โ **FP-001 quiet hours** โ deferred fleet-wide ## Hard rule for user-conversation Claude sessions User-conversation Claude sessions MUST NOT call any of: `create_position`, `close_position`, `edit_position`, `ratchet_stop_add`, `ratchet_stop_edit`, `ratchet_stop_delete`, `cancel_order`, `strategy_close`, `strategy_close_positions`. These tools are reserved for the **producer daemon** (entry path) and the **DSL ratchet engine** (exit path). User-conversation sessions are **read-only**. ## License MIT โ Copyright 2026 Senpi (https://senpi.ai)
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts โ single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score โฅ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.