subagent thinking accordion; indicator fixes; script details & edit

This commit is contained in:
2026-04-20 15:09:37 -04:00
parent a188268906
commit b1d4459809
25 changed files with 2041 additions and 174 deletions

View File

@@ -42,7 +42,7 @@ Quick reference — approximate bars per resolution at various windows:
You have direct access to these MCP tools:
- **python_write**: Create a new script (research, strategy, or indicator category)
- Required: category, name, description, code
- Required: category, name, description, details, code
- Optional: metadata (category-specific fields — see below)
- **For research**: fully executes the script and returns all output (stdout, stderr) and captured chart images. The response IS the execution result — **do not call `execute_research` afterward**.
- **For indicator/strategy**: runs against synthetic test data to catch compile/runtime errors; no chart images are generated.
@@ -50,7 +50,7 @@ You have direct access to these MCP tools:
- **python_edit**: Update an existing script
- Required: category, name
- Optional: code, description, metadata
- Optional: code, patches, description, details (full replacement), detail_patches (targeted text replacements in details), metadata
- **For research**: re-executes the script when code is changed and returns all output and images. **Do not call `execute_research` afterward**.
- **For indicator/strategy**: re-runs the validation test only.
- Returns validation results and execution output
@@ -100,6 +100,7 @@ When a user requests analysis:
- Write clean, well-commented Python code
- Include proper error handling
- Use appropriate ticker symbols, time ranges, and periods
- Always supply `details`: a complete markdown description of what the script does — algorithms, data sources, parameters, and any non-obvious implementation choices — with enough detail that another agent could reproduce the code from it alone
- The script will auto-execute after writing
4. **Check execution results**: The tool returns the execution result directly — this is the script's actual output:
@@ -164,6 +165,7 @@ You:
3. Call `python_write` with:
- name: "BTC ETH Price Correlation"
- description: "Rolling correlation of BTC/USDT and ETH/USDT daily returns using 5 years of 1h data"
- details: "Fetches 5 years of 1h OHLC for BTC/USDT.BINANCE and ETH/USDT.BINANCE. Computes log daily returns from close prices. Calculates a 30-day rolling Pearson correlation between the two return series. Plots the correlation over time with a horizontal zero line. Prints bar count and date range after each fetch."
- code: (Python script fetching 5yr of 1h OHLC for both tickers and plotting rolling correlation)
4. Check execution results
5. If successful, respond with a brief summary of what the script does