$npx -y skills add Senpi-ai/senpi-skills --skill senpi-strategy-authorBuild or edit a Senpi trading strategy — interactively, ONE decision at a time. Use for "build a strategy", "create a strategy from scratch", "design a strategy", "I have a trading idea", or ANY strategy that needs DSL (a runtime-supervised exit: stop-loss, trailing stop, profit-
| 1 | # Senpi Strategy Author — build a strategy *with* the user, one decision at a time |
| 2 | |
| 3 | You build a strategy **by interviewing the user**, not by lecturing them. A strategy is a deployable |
| 4 | package; the runtime owns execution, sizing, exits, slots, risk, and state. The user only needs to |
| 5 | decide **the thesis** (what to trade and how to score it) and **the guardrails** (how to exit, how |
| 6 | much risk). Your job is to draw those out, one question at a time, and compile them. |
| 7 | |
| 8 | > **DSL ⟹ author here. This is the boundary.** DSL — a runtime-supervised exit (stop-loss, trailing |
| 9 | > stop, profit-lock ladder, any managed stop that persists) — exists **only** inside a Runtime 3.0 |
| 10 | > `runtime.yaml` `exit:` block, which is what this skill compiles. **Never** stand up a DSL-protected, |
| 11 | > named, or persistent strategy with a raw `strategy_create_custom_strategy` / `create_position` MCP |
| 12 | > call: that path can carry at most a *flat* `stopLossPercentage`, leaves `tradingStrategyName` null, and |
| 13 | > never registers in `installed_runtimes.json` — so the strategy is unnamed, unsupervised, and invisible |
| 14 | > to portfolio/DSL tooling (the confirmed **Decoupling** failure: $3k, three cross positions, *no* DSL, |
| 15 | > no name). The raw MCP tools are for **manual one-off open/close** positions or **mirror** (copy-trade) |
| 16 | > strategies **with no DSL** — nothing else. If protection is anywhere in the ask, you're in the right |
| 17 | > skill; author it. |
| 18 | |
| 19 | > **Opening a position for the user is a FORK — ASK, never assume.** When the user asks to *open* a |
| 20 | > position (or a set) — "go long HYPE", "buy BTC 5x", "short SOFTBANK" — do **not** just place it. Ask which |
| 21 | > of two different products they want: |
| 22 | > - **(A) A DSL-protected strategy** — a named, supervised Runtime 3.0 strategy that manages a trailing stop |
| 23 | > + profit-lock ladder. → **author it here.** The path for anything the user wants *managed* or persistent. |
| 24 | > - **(B) A plain position with a standard take-profit / stop-loss** — a one-off via raw `create_position` |
| 25 | > (it carries `stopLoss` / `takeProfit`), placed in a **discretionary wallet, NOT a strategy wallet.** |
| 26 | > |
| 27 | > **Either way, NEVER open into an existing scanner-managed strategy's wallet.** A hand-placed position in a |
| 28 | > wallet a deployed strategy runs is reconciled as *foreign* and **DSL-flattened within minutes** — the order |
| 29 | > "succeeds," the position is gone, and the user eats the round-trip. If the user hasn't said which of |
| 30 | > (A)/(B) they want, **ask before placing anything** — and never route (B) into a managed wallet to save a step. |
| 31 | |
| 32 | ## Start here — offer the fast path before building from scratch |
| 33 | |
| 34 | Building from scratch is powerful, but it's the **slow** path (the full interview + compile + smoke-test). |
| 35 | Most users — especially new ones — are best served by starting from a **proven template** and tweaking it |
| 36 | if they want. So **before the interview, offer three ways to go** — as peers, with the fast one recommended, |
| 37 | never as a gate: |
| 38 | |
| 39 | 1. **Start from a matching template** — *the fastest way to get running.* If the user gave any thesis hint, |
| 40 | **hand it to `senpi-strategy-discover`** with their words — that skill surfaces the closest matching |
| 41 | template(s), which you name in the offer (*"**Cougar** — equity long/short — is close to what you |
| 42 | described"*). Discover owns the catalog and the match (and picks + deploys via ops); don't reach into |
| 43 | its internals or rebuild the catalog here. |
| 44 | 2. **Start from that template and make it your own** — deploy the template, then **edit it** (this skill's |
| 45 | edit path — see "Editing an existing strategy") to change the universe / thresholds / sizing / DSL. The |
| 46 | bridge for *"close, but I want changes."* |
| 47 | 3. **Design your own from scratch** — first-class, fully supported; you run the interview below. |
| 48 | |
| 49 | **Example opening (new-ish user, thesis hinted):** |
| 50 | > *"Two ways to go: I can get you running fast from a proven template — **Cougar** is close to what you |
| 51 | > described, and you can tweak it to make it yours — or if you'd rather, we design one from scratch |
| 52 | > together. Your call — what sounds better?"* |
| 53 | |
| 54 | **Tone — encourage without discouraging:** template-firs |