dog-strategy
DOG v3.0.0 โ Contrarian Pup (SM Exhaustion Fader), senpi_runtime_helpers migration. Plumbing-only flip from openclaw-CLI subprocess + mcporter subprocess + Python state to in-process SenpiClient (direct HTTPS for MCP, direct HTTP POST to runtime /signals, long-lived producer_daemon). Thesis preserved verbatim from v2.5: multi-asset (BTC/ETH/SOL/HYPE) contrarian fader, 3.0% exhaustion gate, regime hard-gate, 15m freshness gate, MIN_SCORE 8, conservative leverage (7x base, 10x at score 12+), wide DSL for reversal development.
What this skill does
# ๐ DOG v3.0.0 โ The Contrarian Pup
Smart Money goes one way. Dog goes the other. The crowd is already in โ let them eat the unwind.
## v3.0.0 (2026-05-12) โ plumbing-only migration
NO thesis change. v2.5 scoring tables, contrarian flip, exhaustion gate, regime confirmation, persistence bonus, hard gates all preserved verbatim. Six-layer plumbing flip:
1. **MCP calls**: `cfg.mcporter_call(...)` โ `senpi_runtime_helpers.SenpiClient.mcp_call()` โ direct HTTPS, kills mcporter subprocess cold-start (~280 ms vs 2.5โ5 s per call).
2. **Signal emit**: `create_position` call site removed; producer emits via `cfg._wrapper_client.push_signal(...)` to runtime `/signals`. Runtime opens the position via the LLM-gated `dog_entry` action.
3. **Reentrancy**: hand-rolled fcntl lockfile dropped. `producer_daemon` owns the per-tick `scanner_lock` with stale-PID auto-recovery.
4. **Tick scheduling**: bash `while true; sleep 180` loop replaced by `producer_daemon(fn=main, interval_seconds=180, ...)`. Long-lived Python process, no per-tick cold-start cost.
5. **Risk gates**: Python `MAX_DAILY_ENTRIES`, `COOLDOWN_MINUTES`, dynamic daily cap circuit breaker โ declarative `risk.guard_rails` block in runtime.yaml. No state files to crash.
6. **Exit fee**: DSL exits switched from MARKET (taker, 0.045%) to FEE_OPTIMIZED_LIMIT (maker-first, 0.015%, 60 s ALO timeout, taker fallback). Saves ~0.020-0.030% per maker-filled close.
## Why the contrarian thesis works (preserved from v2.0)
Hyperliquid is dominated by leverage traders chasing momentum. When a coin moves 3%+ in 4 hours and SM consensus piles in 15%+, the crowd is already maximum exposed. The unwind happens for two reasons:
1. **Funding pressure** โ extreme positioning generates extreme funding rates, forcing the late entrants to capitulate.
2. **Mean reversion** โ overextended moves draw counter-trend liquidity from contrarian traders.
Dog's edge is being on the unwind side BEFORE the capitulation accelerates. The wide DSL (`hard_timeout: 6h`, Phase 2 tiers starting at +5%/20% lock) lets real reversals develop without premature cuts.
## What Dog does each tick (3-minute cadence)
1. Pull `leaderboard_get_markets` (top 100 by SM activity)
2. For each of BTC, ETH, SOL, HYPE: identify SM dominant direction
3. **Hard gate**: 4H price moved โฅ 3.0% in the SM direction (exhaustion required)
4. Fetch funding regime + per-asset funding_history for context
5. Score the contrarian setup (SM concentration + exhaustion + 15m freshness + regime confirmation + persistence)
6. **Contrarian flip**: emit the OPPOSITE direction
7. Push signals at `score โฅ 8` via `push_signal()` to runtime `/signals`
8. Runtime LLM gate evaluates โ opens via FEE_OPTIMIZED_LIMIT if confident
9. DSL takes over: trailing exits with maker-first close
## Scoring (preserved from v2.5)
| Signal | Points |
|---|---|
| SM concentration โฅ 15% (DOMINANT) | 3 |
| SM concentration 10-15% (STRONG) | 2 |
| SM concentration 5-10% (ALIGNED) | 1 |
| Trader count โฅ 100 (DEEP_CONSENSUS) | 1 |
| 4H price aligned with SM โฅ 2% (STRONG_4H) | 2 |
| 4H price aligned with SM 0.5-2% (4H_CONFIRMS) | 1 |
| Deep exhaustion (|4H| โฅ 4.0%) โ contrarian BONUS | 2 |
| Moderate exhaustion (|4H| โฅ 2.5%) โ contrarian BONUS | 1 |
| 1H momentum confirms SM | 1 |
| 15m velocity strong spike (cc_15m > 2.0) | 3 |
| 15m velocity spike (cc_15m > 0.5) | 2 |
| 15m velocity building (cc_15m > 0.1) | 1 |
| 1h SM contribution accelerating | 1 |
| Funding pays the fade direction | 1 |
| Regime confirms fade (LONG_CROWDED for SHORT, etc.) | 2 |
| Mature crowding (persistence โฅ 12h) | 2 |
| Stable crowding (persistence โฅ 6h) | 1 |
| Crowding unwinding (DECREASING trend) | 1 |
| Crowding still building (INCREASING) | -1 |
| 4H opposing SM direction (penalty) | -1 |
| US session bonus (13:00-21:00 UTC) | 1 |
**Min score: 8** (producer-level floor). **Max leverage: 10x.**
### Hard gates (any single failure โ SKIP)
- **SM minimums**: trader_count โฅ 30
- **4H exhaustion**: |priceChange4hPct| โฅ 3.0% AND aligned with SM direction
- **15m freshness**: contribChange15m > 0 (SM must still be building, not unwinding)
- **Regime hard-gate**: skip if `regime_confirms_fade(direction)` returns False (e.g. SHORT signal but regime is SHORT_CROWDED โ Dog would be fighting, not fading)
- **XYZ DEX banned**: contrarian thesis is for crypto majors only
- **Held-asset dedup**: producer skips emission if asset already held (defense in depth; runtime per_asset_cooldown is the authoritative gate)
## Leverage tiers
| Score | Leverage |
|---|---|
| โฅ 12 | 10x |
| 8-11 | 7x |
Asset caps applied (BTC 40x, ETH 25x, SOL 20x, HYPE 10x); clamped at MAX_LEVERAGE=10.
## Risk gates (`runtime.yaml` `risk.guard_rails`)
| Gate | Setting | Replaces |
|---|---|---|
| max_entries_per_day | 3 | v2.5 `MAX_DAILY_ENTRIES` |
| per_asset_cooldown_minutes | 120 | v2.5 `COOLDOWN_MINUTES=180` + `SAME_DIR_COOLDOWN=90` |
| daily_loss_limit_pct | 15 | v2.5 dynamic cap's -15% defensive level |
| max_consecutive_losses | 3 | v2.5 (implicit; not enforced) |
| cooldown_minutes (post-loss) | 60 | new (fleet-standard backstop) |
| drawdown_halt_pct | 25 | v2.5 dynamic cap's -25% HARD STOP |
| drawdown_reset_on_day_rollover | false | fleet-standard (Roach lesson) |
v2.5's dynamic daily cap had intermediate tiers (12/8/5/3/1 entries based on session P&L). v3.0 drops the intermediate tiers in favor of static `max_entries_per_day=3` + `drawdown_halt_pct=25`. The conservative ceiling and hard-stop are preserved; the "ride the hot hand" tier (12 entries when up 5%+) is sacrificed for state-file-free reliability.
## DSL preset (wide, patient โ preserved from v2.5)
| Phase | Component | Setting | Why |
|---|---|---|---|
| Phase 1 | max_loss_pct | 15% | Tighter than fleet 25% โ contrarian losses should be small |
| Phase 1 | retrace_threshold | 8 | Standard |
| Phase 1 | consecutive_breaches_required | 1 | Single-breach (Senpi runtime no longer supports multi-breach) |
| Time cuts | hard_timeout | 360 min (6h) | Reversals take time |
| Time cuts | weak_peak_cut | 90 min, min_value 2.0 | Cut if peak ROE < 2% in 90 min |
| Time cuts | dead_weight_cut | 60 min | v2.4 loosened from 30 โ 60 (let fades develop) |
| Phase 2 | T0 | +5% / 20% lock | Don't bank too early |
| Phase 2 | T1 | +10% / 40% lock | |
| Phase 2 | T2 | +15% / 60% lock | |
| Phase 2 | T3 | +20% / 75% lock | |
| Phase 2 | T4 | +30% / 85% lock | apex |
## 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 โ runtime action path** (entry) and the **DSL ratchet engine** (exit). User-conversation sessions are **read-only**.
If the user asks an action-implying question ("anything close to triggering?"), respond by reading the current state โ DO NOT execute. The producer daemon will handle real signals on its next tick.
## Best for
- Operators who believe momentum chasing is a losing edge on Hyperliquid
- Multi-asset diversification across BTC/ETH/SOL/HYPE
- Patient holds (1-6 hours per trade โ reversals take time)
- Counter-trend traders who want a deterministic execution layer
## Not for
- Momentum followers
- High-frequency scalping (Dog targets 2-3 trades per day max)
- Single-asset specialists
- Anyone who wants the scanner to make exit decisions (DSL handles all exits)
## Operator install
See [README.md](README.md) for fresh-install + migration commands from v2.5.
## License
MIT โ Copyright 2026 Senpi (https://senpi.ai). The Contrarian Pup.
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.