validate_rules
Preflight check trading rules for schema errors, missing portfolio assets, and feature coverage before backtests, returning a detailed error list to enable quick fixes.
Instructions
Preflight validation of stored rules: schema-checks each rule's trigger and action grammar, verifies referenced assets exist in the portfolio, and (if flow_job_id given) confirms every feature the rules reference is covered by the FLOW model's feature set. Run this before backtest_rules / forward_test_rules to surface bad rules cheaply (~200ms, free) instead of letting them silently fail mid-backtest. Returns ok=true with empty error lists if all clean; otherwise lists missing_portfolio_assets, missing_rule_features, and per-rule grammar errors so the agent can patch and retry.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rule_ids | No | Specific rules to check (default: all rules in the portfolio) | |
| flow_job_id | No | FLOW generation job to feature-coverage-check against (optional) | |
| portfolio_id | Yes | Portfolio UUID |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |