Trading ops (agent skill)
SkillCommerce & financeOperate the Igor trading lab (paper SPY put-credit validation, broker sync, safety gates, RAG). Use when working in the trading repo, checking status, planning trades, or touching risk/execution code. Prefer dry-run and ledger evidence over claims.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Trading ops (agent skill) skill
What this skill tells your AI
The instructions your AI receives, as published by igorganapolsky/trading in skills/trading-ops/SKILL.md and read by ahel’s review.
This skill teaches an agent how to operate this repository safely. It is not a profit claim.
Repo: paper-first SPY options validation. Active family: spy_put_credit. Iron condor new entries killed.
Safety gates (hard)
Before any action that could submit orders or close positions:
- Read
data/runtime/strategy_kill_switch.json— confirmactive_familyandlive_blocked. - Prefer paper paths only. Live is blocked until kill criteria clear.
- Do not freehand-close positions outside
spy_put_credit.pyorresidual_ic_manager.py. - Do not remove
data/TRADING_HALTED/ halt flags to “unblock” trading. - Do not recreate iron-condor entry workflows; they must remain absent.
- Never hardcode Alpaca keys; use
get_alpaca_credentials().
If a tool or hook refuses a boundary action, treat that as signal — find the allowed path or stop.
Canonical files
| Path | Authority |
|---|---|
data/system_state.json | Broker snapshot (equity, positions, orders) |
data/trades.json | Paired closed structures (edge metrics) |
data/put_credit_entries.json | Put-credit lifecycle journal |
data/runtime/strategy_kill_switch.json | Active / killed strategy families |
src/core/trading_constants.py | Policy constants |
rag_knowledge/lessons_learned/ | Operator memory |
rag_knowledge/arxiv/ | Continuous arXiv research corpus (Agentic RAG) |
data/audit/arxiv_ingestion_manifest.json | arXiv ingest dedupe + run history |
Unmatched fills are not trades. Do not promote them into win rate / expectancy.
Continuous arXiv research ingest
Twice-daily GitHub Action (arxiv-paper-ingestion.yml) pulls new papers from
arXiv (API: export.arxiv.org) into rag_knowledge/arxiv/
and rebuilds data/rag/lessons_query.json. Local:
make arxiv-ingest
python scripts/arxiv_paper_ingestion.py --query "option credit spread" --json
Papers are research context only — never treat them as live signals or edge proof.
Judge panel (claim / PR / coord audit — not trade entry)
Mixture-of-Experts + hard-veto judge for agent claims, PR text/diffs, and multi-agent collisions.
python scripts/judge_panel.py --self-check
python scripts/judge_panel.py --kind claim_audit --text "CI green on run <id> sha <sha>"
python scripts/judge_panel.py --kind pr_audit --diff-file /tmp/patch.diff
python scripts/judge_panel.py --kind coord_audit --agent grok \
--other-claims-file ~/Documents/AI-Agent-Sync/Agent-State/codex.md \
--claimed-file src/evals/judge_panel/panel.py
- Code:
src/evals/judge_panel/ - Never use this panel to approve put-credit or IC entries (
trade_entryalways vetoes). - Edge / “ready for live” claims without ledger or run evidence → fail/veto.
Status commands (read-only first)
python scripts/spy_put_credit.py --status
python scripts/audit_open_inventory.py
python scripts/system_health_check.py
# optional refresh (mutates local state files; does not open risk by itself)
python scripts/sync_alpaca_state.py
python scripts/sync_closed_positions.py
# Graph RAG (relationships across kill switch, lessons, paired trades)
python scripts/graph_rag_query.py --rebuild
python scripts/graph_rag_query.py --query "why is iron condor killed?" --graph-only
# Hard gate: rebuild + 5 golden multi-hop assertions (CI offline-evals + make check)
python scripts/verify_graph_rag.py
make graph-rag-check
# Official Graphify-Labs/graphify (package graphifyy; graph.json query/path/explain)
python scripts/graphify_ops.py status --json
python scripts/graphify_ops.py query "what calls TradeGateway"
make graphify-check
# zg-style local-first search (hybrid|fts|vector|rg) — docs/ZG_LOCAL_SEARCH.md
python scripts/zg_search.py --check-ready
python scripts/zg_search.py "put credit stop loss"
python scripts/zg_search.py --route rg "TradeGateway"
# JIT task→harness pack (memory/plan/actions/skills) — docs/JIT_HARNESS.md
python scripts/jit_harness.py --check-ready
python scripts/jit_harness.py "account status"
python scripts/jit_harness.py --json "put credit dry-run"
python scripts/jit_harness.py --receipt "spy_put_credit --status --dry-run"
python scripts/jit_harness.py --receipt --record "merge ready PRs"
Inventory unclean (exit 2) → no new risk.
Plan vs execute
# plan only — no submit
python scripts/spy_put_credit.py --dry-run
# residual IC plan only (not new IC entries)
python scripts/residual_ic_manager.py --dry-run
Never describe a dry-run plan as an executed trade.
Evidence rules
- Equity / P/L / win rate: cite
data/system_state.jsonordata/trades.jsonwith numbers. - 0 put-credit closed trades in cohort → no profitability claim.
- Prefer
RETRIEVE → CITE → SPEAK.
Git / change protocol
- Feature work in a dedicated
git worktreeunder.worktrees/. - PRs for all changes; merge only with green CI evidence.
- No force-push to
main. - After substantive ops work, record lessons in
rag_knowledge/lessons_learned/when severity ≥ 4 or a repeat mistake occurred.
Tests
make check
make dry-run
What this skill is not
- Not permission to deploy live capital.
- Not a substitute for broker truth.
- Not a claim that put-credit has edge before n≥30 cohort gates pass.
Signals
- GitHub stars
- 38
- Forks
- 10
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
trading-ops- Source
- github.com/igorganapolsky/trading