lynx-strategy
LYNX v1.0.0 โ Adaptive MIN_SCORE Self-Tuner. The Vulture v4.1 story productized into a first-class agent pattern. Runs a simple BTC/ETH/SOL/HYPE momentum scorer; every 6h pulls its own closed-trade history via audit_query, buckets trades by score, and auto-raises MIN_SCORE if any bucket at-or-above the floor is bleeding. The same operation Vulture's agent ran by hand, but on a scheduled cron. NEW archetype #15: Self-tuning / adaptive-threshold agent.
What this skill does
# ๐ฏ LYNX v1.0.0 โ Adaptive MIN_SCORE Self-Tuner
**The Vulture v4.1 story productized.** Lynx is a momentum agent that audits its own closed-trade history every 6 hours and raises its own MIN_SCORE when low-conviction buckets bleed.
## Why this strategy exists
When Vulture's autonomous agent ran the [30-trade audit that led to v4.1](https://github.com/Senpi-ai/senpi-skills/pull/337), it manually identified that Score 7โ8 trades had been net-negative and raised `MIN_SCORE` 7โ9 by hand. The fix worked. The question Lynx asks: *why is that operation manual?*
Lynx bakes the same operation into a scheduled cron. Every `auditEverySec` (default 6h), it:
1. Pulls its own closed-trade history via `audit_query(user_ids=[senpiUserId], action_type="close", limit=auditLimit)`
2. Parses the entry score from each trade's `ai_reasoning` field
3. Buckets trades by score and computes `{n, avg_roe_pct, win_rate_pct}` per bucket
4. Identifies the **highest-scoring bucket at or above the current floor** that has `n >= minBucketN` AND `avg_roe_pct < bucketBleedThresholdPct`
5. If found, recommends `MIN_SCORE = that_bucket + 1` (capped at `maxMinScore`)
6. If the recommendation moves by at least the hysteresis (1), persists the new MIN_SCORE and logs the adjustment
This is the **first fleet agent that modifies its own behavior based on its own trade history**. The same loop the Vulture team ran by hand โ but every 6 hours, automatically, on every Lynx instance.
## CRITICAL RULES
### RULE 1: Self-tuning is gated on `senpiUserId`
The audit requires `audit_query` with the operator's Senpi user ID. If `config.senpiUserId` is empty, Lynx **still runs** (using `initialMinScore`) but the audit is skipped and the tick output notes `"no senpiUserId โ self-tuning disabled"`. The operator can find their ID via `user_get_me` or `arena_leaderboard`.
### RULE 2: Lynx never *lowers* its own MIN_SCORE
The `should_update_threshold` function only acts on raises (hysteresis โฅ +1). A floor that has worked won't be relaxed by a quiet period. Lynx ratchets up; it never ratchets down.
### RULE 3: The cap is hard
`maxMinScore` (default 7) is an absolute ceiling. Even if every bucket up to 7 bleeds, Lynx won't go above 7 โ at which point the operator should diagnose the underlying scoring logic rather than keep raising the floor.
### RULE 4: Adjustments are logged forever
Each successful raise is appended to `state.adjustments` with timestamp, previous and new floor, bleeding-bucket evidence, and the audit's trade-count. The state file is the audit trail.
### RULE 5: Producer NEVER closes
DSL owns exits. Lynx's innovation is in **entry selection**, not exit management โ exits use the proven `let_winners_run` ladder.
## How Lynx scores a trade
Composite of 4 components (max ~8):
| Component | Points |
|---|---|
| 4h trend strength: `|move| >= 4%` โ +3, `>= 2%` โ +2, `>= 1%` โ +1 | up to 3 |
| 1h confirmation: 1h move aligned with 4h direction, `|move| >= 0.5%` | +2 |
| Smart Money aligned: SM tilts in direction, `>= smTiltMinPct` (55%) | +2 |
| Volume rising: 12h vol vs 36h baseline ratio `>= 1.3` | +1 |
Initial `MIN_SCORE: 4` (permissive โ gives the audit data to work with). Auto-tunes up to `maxMinScore: 7`. Operators see the current MIN_SCORE in every tick's output (`currentMinScore` field) โ so they can watch Lynx learn live.
## DSL preset (`let_winners_run` โ momentum-class)
Standard momentum-class let-winners-run: max_loss 20%, retrace 12, 7d hard_timeout, no weak_peak_cut, Phase 2 ladder +10/0 โ +20/25 โ +35/50 โ +60/70 โ +100/85. The Lynx innovation is in entry, not exit.
## Scanner pattern
NEW archetype #15: **Self-tuning / adaptive-threshold agent** โ see `senpi-trading-runtime/references/producer-patterns.md`. Primary MCP calls: `market_get_asset_data` per whitelisted asset (the producer signature), `leaderboard_get_markets` (SM gate), `audit_query` (the self-tuning audit โ every 6h). The pure functions (`parse_score_from_reasoning`, `compute_bucket_stats`, `recommend_min_score`, `should_update_threshold`, `pct_move`, `trend_direction`, `lynx_score`) are unit-tested in `tests/test_signal.py`.
## Operator install
See [README.md](README.md).
## Changelog
### v1.0.0 (2026-05-29) โ initial release
First fleet agent to **modify its own behavior based on its own trade history**. Productizes the Vulture v4.1 manual cull as a scheduled audit. Introduces archetype #15 (self-tuning agent). 19/19 unit tests covering both the self-tuning logic (parse_score, compute_bucket_stats, recommend_min_score, should_update_threshold) and the scoring logic (pct_move, trend_direction, lynx_score). Taker-true entry, disown-safe launch.
## License
MIT โ Copyright 2026 Senpi (https://senpi.ai).
## Skill Attribution
When creating a strategy, include `skill_name` and `skill_version`. See `references/skill-attribution.md`.
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.