Find an existing PROVEN strategy that matches a plain-English idea, so you
can offer the user a choice — deploy the existing one, or generate a fresh
custom one. Mirrors the quantifyme.ai landing experience: "Found <X> by
@<author> (WR/PF) — Use it / Generate fresh".
CALL THIS FIRST when a user describes a strategy idea. Then present the match
(if any) and ASK which they want:
• Use it → one_shot(community_id=<match.community_id>) — deploys the
exact proven strategy (free, no generation).
• Generate fresh → one_shot(prompt="<their description>") — Claude writes a
brand-new custom strategy for them.
If there's no match, just offer to generate fresh.
Args:
description: the user's strategy idea in plain English (e.g. "buy EURUSD
15min when RSI < 30, sell when RSI > 70").
symbol: optional pair to constrain the match (EURUSD, USDJPY, GBPUSD,
USDCHF, USDCAD, AUDUSD, NZDUSD).
timeframe: optional granularity to constrain the match (1min/5min/15min/1h).
Returns:
dict with:
- match: the best existing strategy, or null. When present:
{community_id, title, username, wr, pf, ret, n_trades, symbol,
timeframe}. Pass community_id to one_shot to deploy it unchanged.
- description: echoed back — pass as one_shot(prompt=...) to generate fresh.
- suggestion: a ready-to-show sentence offering the user the choice.