ReadyTrader-Stocks: Instructions file for Codex

AGENTS.md

ReadyTrader-Stocks AGENTS.md is an instructions file for Codex, OpenCode from up2itnow0822/ReadyTrader-Stocks. It costs 1,372 tokens per session, scanned A, original, MIT.

A repository guide for ReadyTrader-Stocks, a tool that lets an AI agent research US stocks and manage paper or approved live trades. It records the project's ownership, rules, safety controls, and work guidance in an AGENTS.md file.

In plain words
What is it for?
Use it when modifying the stock-research server, trading rules, brokerage connections, approval dashboard, or Next.js interface. It also points agents to tests, configuration files, and areas that must not be shipped.
Why use it?
It gives coding agents the local rules they need before changing a financial trading project. This helps prevent changes that bypass risk checks, approvals, or the emergency stop.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is up2itnow0822/ReadyTrader-Stocks's own configuration. It tells Codex and OpenCode how to work on ReadyTrader-Stocks itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ReadyTrader-Stocks configures →

Reuse

Borrowing it

Nothing to install: this file belongs to up2itnow0822/ReadyTrader-Stocks. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/up2itnow0822/ReadyTrader-Stocks/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/up2itnow0822/ReadyTrader-Stocks

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ReadyTrader-Stocks AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/up2itnow0822/readytrader-stocks/agents-md/github.svg)](https://agentmods.dev/instructions/up2itnow0822/readytrader-stocks/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/up2itnow0822/readytrader-stocks/agents-md"><img src="https://agentmods.dev/badge/instructions/up2itnow0822/readytrader-stocks/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ReadyTrader-Stocks AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/up2itnow0822/readytrader-stocks/agents-md"><img src="https://agentmods.dev/badge/instructions/up2itnow0822/readytrader-stocks/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,372 This file is loaded in full into every session.
When invoked 1,372 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01372 $0.01372
Opus 5.5 $0.00549 $0.00549
Sonnet 5.5 $0.00274 $0.00274
Haiku 4.5 $0.00137 $0.00137

Measured 10d ago against content hash 4c8bcc978559, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ReadyTrader-Stocks AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 79 lines

How it starts

The opening of the file, as written. The whole thing — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ReadyTrader-Stocks

Root AGENTS.md (DOX rail).

Purpose

A stdio MCP server (app/main.py, 20 tools) that lets an AI agent research US stocks, paper trade in a local ledger, and optionally place live brokerage orders behind a Risk Guardian, an operator policy and a kill switch; plus an approval/dashboard API (app/api_server.py) and a Next.js dashboard (frontend/).

Ownership

  • app/: MCP tool surface (app/tools/), settings (app/core/config.py), the approval API.
  • core/: pure rules (risk, Falling Knife market_guard, policy, paper ledger, backtest).
  • execution/: brokerage connectors and the approval store; marketdata/, intelligence/: data sources. common/: shared helpers (common/switches.py, common/paths.py).
  • research/falling_knife/: the study behind docs/FALLING_KNIFE.md; nothing imports it.
  • _deprecated/: history only, never shipped.
  • configs/: copy/paste MCP client configs, each in its client's own format (Agent Zero: agent_zero.mcp.json, the {"mcpServers": ...} JSON for Settings → MCP/A2A → External MCP Servers); tests/test_configs.py keeps them and the README's examples in step.

Local Contracts

  • Fail closed. Safety switches are parsed with common/switches.py: protections stay on unless explicitly false/0/no/off; LIVE_TRADING_ENABLED needs exactly true; the kill switch halts on any value but empty/off; an unknown EXECUTION_APPROVAL_MODE requires approval; an unreadable limit refuses live orders. Brokerage connectors default to paper/sandbox accounts.
  • Every live order passes pre_trade_check and live_order_refusal when placed or proposed, and again at execution (including /api/approve-trade); a proposal executes only in the mode (paper/live) it was made in.
  • Risk rules judge the exposure an order adds (from the paper ledger or the brokerage's positions): selling out of a position is never sized as new exposure; an order that adds exposure and cannot be priced or sized is refused; unknown live positions count as new exposure.
  • Orders are valued at the market price (a limit at the higher of limit and market), never at a price the caller supplies alone; a market order's price is dropped before it can size, propose or reach a brokerage. Symbols are normalised (strip, upper case) once, in place_stock_order; a / is refused, and in paper mode so is a ticker spelled like the ledger's cash (USD).
  • Paper loss limits (core/paper.py get_risk_metrics) read a time-weighted performance index: deposits (valued when made; deposit_paper_funds refuses shares it cannot price) are neither gains nor losses; holdings are marked to the latest quote before every check; the daily baseline is the previous UTC day's last snapshot, else the day-open mark. Live orders report the daily-loss and drawdown rules in inactive_rules.
  • The approval API: API_OPERATOR_TOKEN (API process only) gates every /api/ call but /api/health through the require_operator dependency of the operator_api router (never a path check in a middleware: the URL path can differ from the routed path); CORS is added after the request_context middleware so it wraps every answer. It is required to approve live proposals (the agent holds the confirm_token); every response carries X-Request-ID and security headers; errors never echo exception text.
  • Tools answer {"ok": true, "data"} or {"ok": false, "error": {"code", "message", "data"}}; a source that cannot answer is an error, never a payload. New codes go in docs/ERRORS.md.
  • A price is finite and positive or it is no price: provider rows without one are dropped (marketdata/exchange_provider._priced_rows), orders value only real prices (_real_price), and the paper engine refuses a non-finite price, amount or balance before it writes (NaN compares false against every limit).
  • Default data files live in <repo>/data/ via common/paths.data_path (never the working directory); READYTRADER_DATA_DIR and each *_PATH variable override.
  • Every variable the code reads is in env.example, with no inline comments or placeholder keys.
  • Nothing waits at the broker: an Alpaca order is sent only while the market is open (market_closed_reason; else market_closed), as IOC (fractional market orders DAY, fractional limits refused), and read back for what filled, because the Guardian judges an order at the moment it is placed; the other connectors' resting limits are documented, never counted.
  • Numeric MCP tool parameters use app/tools/params.py (Number, Integer): booleans are refused.
  • In live mode the operator switches answer first (order tools and approval, before a proposal is consumed); every well-formed order request is audited (trade_start).
  • Docker: the image runs as the unprivileged readytrader user; .dockerignore patterns are **/ (a bare pattern matches only at the context root) and keep every .env*, key file and database out.
  • Docs describe only what runs: after changing a tool, run python tools/generate_tool_docs.py and update README / docs/ in the same change.

Read the full file on GitHub · 79 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 79 lines · 1,372 tokens per session scan A 4c8bcc978559

Subscribe to this mod's changes

ReadyTrader-Stocks AGENTS.md is an instructions file published in the GitHub repository up2itnow0822/ReadyTrader-Stocks (0 stars, last pushed 10d ago), licensed MIT. It adds 1,372 tokens to every session, about $0.0055 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-11.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,649 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,384 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens