agentleFS
YichengYang-EthanYichengYang-Ethan/oracle3-prediction-market-agent/AGENTS.md

oracle3-prediction-market-agent

AGENTS.md309 starsChanged 2 months agoApache-2.0View on GitHub

Instructions for AI coding agents working in this repository. Humans may find it useful too. Oracle3 is a trading engine (live on Kalshi, Polymarket and Solana, or on paper) and an MCP server for prediction markets. It checks whether prices of related event contracts violate probability bounds after each venue's fees, and paper-trades the baskets that survive under pre-trade risk limits. See README.md. CI runs all four on every push to main. New code needs tests; venue APIs must be…

The file

We split this AGENTS.md into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Default to paper: Never run oracle3 live run or any command that places real orders unless the user explicitly asks for live trading in …

    line 40
  2. Very specific:

    Never print, commit or log credentials (KALSHI_*, POLYMARKET_*, Solana keypairs).

    line 44
  3. Distinctive:

    Do not describe paper or backtest results as live performance, and do not add performance claims to the README without a reproducible …

    line 50
  4. Very specific:

    Keep server.json, pyproject.toml, oracle3/__init__.py and CITATION.cff versions in sync (commitizen bumps all four).

    line 51

≈ “Common” is an estimate: at least 1 in 5 of the 16,597 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS.md

Instructions for AI coding agents working in this repository. Humans may find it useful too.

What this project is

Oracle3 is a trading engine (live on Kalshi, Polymarket and Solana, or on paper) and an MCP server for prediction markets. It checks whether prices of related event contracts violate probability bounds after each venue's fees, and paper-trades the baskets that survive under pre-trade risk limits. See README.md.

Setup and checks

poetry install --all-extras                     # Python 3.10+
poetry run pytest                               # tests (coverage report included)
ruff check . && ruff format .                   # lint and format (single quotes, 88 columns)
poetry run mypy --config-file pyproject.toml .  # type check
codespell -c pyproject.toml                     # spelling

CI runs all four on every push to main. New code needs tests; venue APIs must be mocked in tests (see tests/test_mcp_server.py for an httpx.MockTransport example).

Layout

PathContents
oracle3/fees.pyKalshi and Polymarket fee schedules as published; per-market schedules from the venue APIs
oracle3/arbitrage.pyStatic no-arbitrage checks: implication, exclusivity, complement, same event, event sum
oracle3/mcp_server/MCP server (oracle3 mcp or oracle3-mcp), public venue adapters, paper ledger
oracle3/strategy/Strategies; contrib/ holds the constraint, statistical and model-driven ones
oracle3/pricing/Wang-transform fair-value engine and estimators
oracle3/market/Relation store and statistical validation of relations
oracle3/trader/Paper and live traders, spread executor
oracle3/cli/Click CLI (oracle3 ...)
oracle3/experimental/Prototypes that are not on the trading path
coinjure/Bundled package from the original U Lab codebase (MIT; see NOTICE)
skills/Agent skills, mirrored to .claude/skills/
docs/MkDocs site, including docs/research/fee-frontier.md

Safety rules

  • Default to paper. Never run oracle3 live run or any command that places real orders unless the user explicitly asks for live trading in this session.
  • Commands that only read data (safe to run): oracle3 market ..., oracle3 news fetch, oracle3 trade status|state, and every MCP tool except the paper_* ones. oracle3 research ... reads local history files and writes only to output paths you pass.
  • Commands with local side effects: oracle3 paper run, oracle3 data record, oracle3 trade pause|resume|swap|stop|killswitch, and the MCP paper_order/paper_reset tools (local JSON ledger only).
  • Order-placing commands: oracle3 live run and the live traders in oracle3/trader/. The MCP server imports none of them.
  • Never print, commit or log credentials (KALSHI_*, POLYMARKET_*, Solana keypairs).

Conventions

  • English only in code, comments, docs and commit messages.
  • Fees come from oracle3.fees; do not hard-code new fee constants.
  • Do not describe paper or backtest results as live performance, and do not add performance claims to the README without a reproducible script.
  • Keep server.json, pyproject.toml, oracle3/__init__.py and CITATION.cff versions in sync (commitizen bumps all four).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.